Package org.epics.pvdata.factory
Class BasePVULongArray
- java.lang.Object
-
- org.epics.pvdata.factory.AbstractPVField
-
- org.epics.pvdata.factory.AbstractPVArray
-
- org.epics.pvdata.factory.AbstractPVScalarArray
-
- org.epics.pvdata.factory.BasePVULongArray
-
- All Implemented Interfaces:
PVArray,PVField,PVNumberArray,PVScalarArray,PVULongArray,Serializable,SerializableArray
public class BasePVULongArray extends AbstractPVScalarArray implements PVULongArray
Base class for implementing PVULongArray.- Author:
- mrk
-
-
Field Summary
Fields Modifier and Type Field Description protected long[]value-
Fields inherited from class org.epics.pvdata.factory.AbstractPVArray
capacity, capacityMutable, length
-
Fields inherited from class org.epics.pvdata.factory.AbstractPVField
convert
-
-
Constructor Summary
Constructors Constructor Description BasePVULongArray(ScalarArray array)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidallocate(int newCapacity)org.epics.util.array.ArrayULongget()Returns an unmodifiable view of the data.intget(int offset, int len, LongArrayData data)Get values from a PVLongArray and put them into long[]to.protected intgetFromBuffer(ByteBuffer buffer, DeserializableControl control, int offset, int length)protected ObjectgetValue()inthashCode()intput(int offset, int len, long[] from, int fromOffset)Put values into a PVLongArray from long[]from.protected intputToBuffer(ByteBuffer buffer, SerializableControl control, int offset, int length)protected voidsetValue(Object array)voidshareData(long[] from)Share the data from caller.protected booleanvalueEquals(Object obj)-
Methods inherited from class org.epics.pvdata.factory.AbstractPVScalarArray
deserialize, getElementSize, getScalarArray, serialize
-
Methods inherited from class org.epics.pvdata.factory.AbstractPVArray
equals, getArray, getCapacity, getLength, internalGet, internalPut, internalShareData, isCapacityMutable, put, serialize, setCapacity, setCapacityMutable, setImmutable, setLength
-
Methods inherited from class org.epics.pvdata.factory.AbstractPVField
changeField, getField, getFieldName, getFieldOffset, getFullName, getNextFieldOffset, getNumberFields, getParent, isImmutable, postPut, setData, setPostHandler, toString, toString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.epics.pvdata.pv.PVArray
getArray, getCapacity, getLength, isCapacityMutable, setCapacity, setCapacityMutable, setLength
-
Methods inherited from interface org.epics.pvdata.pv.PVField
getField, getFieldName, getFieldOffset, getFullName, getNextFieldOffset, getNumberFields, getParent, isImmutable, postPut, setImmutable, setPostHandler, toString, toString, toString
-
Methods inherited from interface org.epics.pvdata.pv.PVNumberArray
put
-
Methods inherited from interface org.epics.pvdata.pv.PVScalarArray
getScalarArray
-
Methods inherited from interface org.epics.pvdata.pv.Serializable
deserialize, serialize
-
Methods inherited from interface org.epics.pvdata.pv.SerializableArray
serialize
-
-
-
-
Constructor Detail
-
BasePVULongArray
public BasePVULongArray(ScalarArray array)
Constructor.- Parameters:
array- The introspection interface.
-
-
Method Detail
-
allocate
protected void allocate(int newCapacity)
- Specified by:
allocatein classAbstractPVArray
-
getValue
protected Object getValue()
- Specified by:
getValuein classAbstractPVArray
-
setValue
protected void setValue(Object array)
- Specified by:
setValuein classAbstractPVArray
-
putToBuffer
protected int putToBuffer(ByteBuffer buffer, SerializableControl control, int offset, int length)
- Specified by:
putToBufferin classAbstractPVScalarArray
-
getFromBuffer
protected int getFromBuffer(ByteBuffer buffer, DeserializableControl control, int offset, int length)
- Specified by:
getFromBufferin classAbstractPVScalarArray
-
get
public int get(int offset, int len, LongArrayData data)Description copied from interface:PVULongArrayGet values from a PVLongArray and put them into long[]to.- Specified by:
getin interfacePVULongArray- Parameters:
offset- the offset to the first element to getlen- the maximum number of elements to transferdata- the class containing the data and an offset into the data. Get sets these values. The caller must do the actual data transfer.- Returns:
- the number of elements that can be transfered. This is always less than or equal to length. If the value is less then length then get should be called again. If the return value is greater than 0 then data.data is a reference to the array and data.offset is the offset into the array.
-
get
public org.epics.util.array.ArrayULong get()
Description copied from interface:PVULongArrayReturns an unmodifiable view of the data.- Specified by:
getin interfacePVNumberArray- Specified by:
getin interfacePVULongArray- Returns:
- an unmodifiable view of the data
-
put
public int put(int offset, int len, long[] from, int fromOffset)Description copied from interface:PVULongArrayPut values into a PVLongArray from long[]from.- Specified by:
putin interfacePVULongArray- Parameters:
offset- the offset to the first element to putlen- the maximum number of elements to transferfrom- the array from which to get the datafromOffset- the offset into from- Returns:
- the number of elements transfered. This is always less than or equal to length. If the value is less than the length then put should be called again.
-
shareData
public void shareData(long[] from)
Description copied from interface:PVULongArrayShare the data from caller. The capacity and length are taken from the array and this array is made immutable. This should only be used to share immutable data.- Specified by:
shareDatain interfacePVULongArray- Parameters:
from- the data to share
-
valueEquals
protected boolean valueEquals(Object obj)
- Specified by:
valueEqualsin classAbstractPVArray
-
-