Package edu.nps.moves.dis7.pdus
Class GridAxisDescriptorVariable
java.lang.Object
edu.nps.moves.dis7.pdus.GridAxisDescriptor
edu.nps.moves.dis7.pdus.GridAxisDescriptorVariable
- All Implemented Interfaces:
Serializable
Grid axis descriptor fo variable spacing axis data.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleThe constant offset value that shall be applied to the grid locations for the xi axisprotected doublevalue that linearly scales the coordinates of the grid locations for the xi axisprotected shortinitial grid point for the current pduprotected shortNumber of grid locations along Xi axisprotected short[]list of coordinatesFields inherited from class edu.nps.moves.dis7.pdus.GridAxisDescriptor
axisType, domainFinalXi, domainInitialXi, domainPointsXi, interleafFactor -
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectdoubleGetter forcoordinateOffsetXidoubleGetter forcoordinateScaleXishortGetter forinitialIndexintReturns size of this serialized (marshalled) object in bytesshortGetter fornumberOfPointsOnXiAxisshort[]Getter forxiValuesinthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setCoordinateOffsetXi(double pCoordinateOffsetXi) Setter forcoordinateOffsetXisetCoordinateScaleXi(double pCoordinateScaleXi) Setter forcoordinateScaleXisetInitialIndex(int pInitialIndex) Utility setter forinitialIndexsetInitialIndex(short pInitialIndex) Setter forinitialIndexsetNumberOfPointsOnXiAxis(int pNumberOfPointsOnXiAxis) Utility setter fornumberOfPointsOnXiAxissetNumberOfPointsOnXiAxis(short pNumberOfPointsOnXiAxis) Setter fornumberOfPointsOnXiAxissetXiValues(short[] pXiValues) Setter forxiValuestoString()intunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.GridAxisDescriptor
getAxisType, getDomainFinalXi, getDomainInitialXi, getDomainPointsXi, getInterleafFactor, setAxisType, setDomainFinalXi, setDomainInitialXi, setDomainPointsXi, setDomainPointsXi, setInterleafFactor, setInterleafFactor
-
Field Details
-
numberOfPointsOnXiAxis
protected short numberOfPointsOnXiAxisNumber of grid locations along Xi axis -
initialIndex
protected short initialIndexinitial grid point for the current pdu -
coordinateScaleXi
protected double coordinateScaleXivalue that linearly scales the coordinates of the grid locations for the xi axis -
coordinateOffsetXi
protected double coordinateOffsetXiThe constant offset value that shall be applied to the grid locations for the xi axis -
xiValues
protected short[] xiValueslist of coordinates
-
-
Constructor Details
-
GridAxisDescriptorVariable
public GridAxisDescriptorVariable()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Overrides:
getMarshalledSizein classGridAxisDescriptor- Returns:
- serialized size in bytes
- See Also:
-
setNumberOfPointsOnXiAxis
Setter fornumberOfPointsOnXiAxis- Parameters:
pNumberOfPointsOnXiAxis- new value of interest- Returns:
- same object to permit progressive setters
-
setNumberOfPointsOnXiAxis
Utility setter fornumberOfPointsOnXiAxis- Parameters:
pNumberOfPointsOnXiAxis- new value of interest- Returns:
- same object to permit progressive setters
-
getNumberOfPointsOnXiAxis
public short getNumberOfPointsOnXiAxis()Getter fornumberOfPointsOnXiAxis- Returns:
- value of interest
-
setInitialIndex
Setter forinitialIndex- Parameters:
pInitialIndex- new value of interest- Returns:
- same object to permit progressive setters
-
setInitialIndex
Utility setter forinitialIndex- Parameters:
pInitialIndex- new value of interest- Returns:
- same object to permit progressive setters
-
getInitialIndex
-
setCoordinateScaleXi
Setter forcoordinateScaleXi- Parameters:
pCoordinateScaleXi- new value of interest- Returns:
- same object to permit progressive setters
-
getCoordinateScaleXi
-
setCoordinateOffsetXi
Setter forcoordinateOffsetXi- Parameters:
pCoordinateOffsetXi- new value of interest- Returns:
- same object to permit progressive setters
-
getCoordinateOffsetXi
-
setXiValues
Setter forxiValues- Parameters:
pXiValues- new value of interest- Returns:
- same object to permit progressive setters
-
getXiValues
-
marshal
Serializes an object to a DataOutputStream.- Overrides:
marshalin classGridAxisDescriptor- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Overrides:
unmarshalin classGridAxisDescriptor- Parameters:
dis- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception- if something goes wrong- See Also:
-
marshal
Packs an object into the ByteBuffer.- Overrides:
marshalin classGridAxisDescriptor- Parameters:
byteBuffer- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException- if byteBuffer is too smallReadOnlyBufferException- if byteBuffer is read onlyException- ByteBuffer-generated exception- See Also:
-
unmarshal
Unpacks a Pdu from the underlying data.- Overrides:
unmarshalin classGridAxisDescriptor- Parameters:
byteBuffer- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException- if byteBuffer is too smallException- ByteBuffer-generated exception- See Also:
-
equals
- Overrides:
equalsin classGridAxisDescriptor
-
equalsImpl
Description copied from class:GridAxisDescriptorCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classGridAxisDescriptor- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toStringin classGridAxisDescriptor
-
hashCode
public int hashCode()- Overrides:
hashCodein classGridAxisDescriptor
-