Package org.epics.pvdata.factory
Class AbstractPVArray
- java.lang.Object
-
- org.epics.pvdata.factory.AbstractPVField
-
- org.epics.pvdata.factory.AbstractPVArray
-
- All Implemented Interfaces:
PVArray,PVField,Serializable,SerializableArray
- Direct Known Subclasses:
AbstractPVComplexArray,AbstractPVScalarArray
public abstract class AbstractPVArray extends AbstractPVField implements PVArray
Abstract base class for any PVArray field. Any code that implements a PVArray field for an IOC database should extend this class.- Author:
- mrk
-
-
Field Summary
Fields Modifier and Type Field Description protected intcapacityFor use by derived classes.protected booleancapacityMutableFor use by derived classes.protected intlengthFor use by derived classes.-
Fields inherited from class org.epics.pvdata.factory.AbstractPVField
convert
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPVArray(Array field)Constructor that derived classes must call.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidallocate(int newCapacity)booleanequals(Object obj)ArraygetArray()Get the Array introspection interface.intgetCapacity()Get the current capacity of the array, that is, the allocated number of elements.intgetLength()Get the current length of the array.protected abstract ObjectgetValue()protected intinternalGet(int offset, int len, ArrayData<?> data)protected intinternalPut(int offset, int len, Object from, int fromOffset)protected voidinternalShareData(Object from)booleanisCapacityMutable()Can the capacity be changed?voidput(int offset, org.epics.util.array.ListNumber list)voidserialize(ByteBuffer buffer, SerializableControl flusher)Serialize field into given buffer.voidsetCapacity(int newCapacity)Set the capacity.voidsetCapacityMutable(boolean isMutable)Set capacityMutable.voidsetImmutable()Set the field to be immutable - that is, it can no longer be modified.voidsetLength(int len)Set the length of the array.protected abstract voidsetValue(Object array)protected abstract booleanvalueEquals(Object obj)-
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, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.epics.pvdata.pv.PVField
getField, getFieldName, getFieldOffset, getFullName, getNextFieldOffset, getNumberFields, getParent, isImmutable, postPut, setPostHandler, toString, toString, toString
-
Methods inherited from interface org.epics.pvdata.pv.Serializable
deserialize
-
Methods inherited from interface org.epics.pvdata.pv.SerializableArray
serialize
-
-
-
-
Constructor Detail
-
AbstractPVArray
protected AbstractPVArray(Array field)
Constructor that derived classes must call.- Parameters:
field- the reflection interface
-
-
Method Detail
-
getArray
public Array getArray()
Description copied from interface:PVArrayGet the Array introspection interface.
-
getValue
protected abstract Object getValue()
-
setValue
protected abstract void setValue(Object array)
-
allocate
protected abstract void allocate(int newCapacity)
-
valueEquals
protected abstract boolean valueEquals(Object obj)
-
setCapacity
public void setCapacity(int newCapacity)
Description copied from interface:PVArraySet the capacity.- Specified by:
setCapacityin interfacePVArray- Parameters:
newCapacity- the new capacity for the array
-
internalGet
protected int internalGet(int offset, int len, ArrayData<?> data)
-
internalPut
protected int internalPut(int offset, int len, Object from, int fromOffset)
-
put
public void put(int offset, org.epics.util.array.ListNumber list)
-
internalShareData
protected void internalShareData(Object from)
-
setImmutable
public void setImmutable()
Description copied from interface:PVFieldSet the field to be immutable - that is, it can no longer be modified. This is permanent. Once done the field cannot be made mutable.- Specified by:
setImmutablein interfacePVField- Overrides:
setImmutablein classAbstractPVField
-
isCapacityMutable
public boolean isCapacityMutable()
Description copied from interface:PVArrayCan the capacity be changed?- Specified by:
isCapacityMutablein interfacePVArray- Returns:
- whether it can be modified
-
setCapacityMutable
public void setCapacityMutable(boolean isMutable)
Description copied from interface:PVArraySet capacityMutable.- Specified by:
setCapacityMutablein interfacePVArray- Parameters:
isMutable- the new value for capacityMutable
-
getCapacity
public int getCapacity()
Description copied from interface:PVArrayGet the current capacity of the array, that is, the allocated number of elements.- Specified by:
getCapacityin interfacePVArray- Returns:
- the capacity
-
getLength
public int getLength()
Description copied from interface:PVArrayGet the current length of the array.
-
setLength
public void setLength(int len)
Description copied from interface:PVArraySet the length of the array.
-
serialize
public void serialize(ByteBuffer buffer, SerializableControl flusher)
Description copied from interface:SerializableSerialize field into given buffer.- Specified by:
serializein interfaceSerializable- Parameters:
buffer- the serialization bufferflusher- the flush interface
-
-