Package org.epics.pvdata.factory
Class BasePVStructureArray
- java.lang.Object
-
- org.epics.pvdata.factory.AbstractPVField
-
- org.epics.pvdata.factory.AbstractPVArray
-
- org.epics.pvdata.factory.AbstractPVComplexArray
-
- org.epics.pvdata.factory.BasePVStructureArray
-
- All Implemented Interfaces:
PVArray,PVField,PVStructureArray,Serializable,SerializableArray
public class BasePVStructureArray extends AbstractPVComplexArray implements PVStructureArray
Base class for implementing PVStructureArray.- Author:
- mrk
-
-
Field Summary
Fields Modifier and Type Field Description protected StructureArraystructureArrayprotected PVStructure[]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 BasePVStructureArray(StructureArray structureArray)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidallocate(int newCapacity)protected SerializablecreateNewInstance()intget(int offset, int len, StructureArrayData data)Get values from a PVDoubleArray and put them into double[]toprotected SerializablegetAt(int index)StructureArraygetStructureArray()Get the introspection interface.protected ObjectgetValue()inthashCode()intput(int offset, int len, PVStructure[] from, int fromOffset)Put values into a PVStructureArray from PVStructure[]fromprotected voidsetAt(int index, Serializable obj)protected voidsetValue(Object array)voidshareData(PVStructure[] from)Share the data from caller.protected booleanvalueEquals(Object obj)-
Methods inherited from class org.epics.pvdata.factory.AbstractPVComplexArray
deserialize, 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.Serializable
deserialize, serialize
-
Methods inherited from interface org.epics.pvdata.pv.SerializableArray
serialize
-
-
-
-
Field Detail
-
value
protected PVStructure[] value
-
structureArray
protected StructureArray structureArray
-
-
Constructor Detail
-
BasePVStructureArray
public BasePVStructureArray(StructureArray structureArray)
Constructor.- Parameters:
structureArray- The Introspection interface.
-
-
Method Detail
-
getStructureArray
public StructureArray getStructureArray()
Description copied from interface:PVStructureArrayGet the introspection interface.- Specified by:
getStructureArrayin interfacePVStructureArray- Returns:
- The interface.
-
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
-
get
public int get(int offset, int len, StructureArrayData data)Description copied from interface:PVStructureArrayGet values from a PVDoubleArray and put them into double[]to- Specified by:
getin interfacePVStructureArray- 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.
-
put
public int put(int offset, int len, PVStructure[] from, int fromOffset)Description copied from interface:PVStructureArrayPut values into a PVStructureArray from PVStructure[]from- Specified by:
putin interfacePVStructureArray- 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(PVStructure[] from)
Description copied from interface:PVStructureArrayShare 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 interfacePVStructureArray- Parameters:
from- the data to share
-
valueEquals
protected boolean valueEquals(Object obj)
- Specified by:
valueEqualsin classAbstractPVArray
-
getAt
protected Serializable getAt(int index)
- Specified by:
getAtin classAbstractPVComplexArray
-
setAt
protected void setAt(int index, Serializable obj)- Specified by:
setAtin classAbstractPVComplexArray
-
createNewInstance
protected Serializable createNewInstance()
- Specified by:
createNewInstancein classAbstractPVComplexArray
-
-