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 double
The constant offset value that shall be applied to the grid locations for the xi axisprotected double
value that linearly scales the coordinates of the grid locations for the xi axisprotected short
initial grid point for the current pduprotected short
Number 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 TypeMethodDescriptionboolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectdouble
Getter forcoordinateOffsetXi
double
Getter forcoordinateScaleXi
short
Getter forinitialIndex
int
Returns size of this serialized (marshalled) object in bytesshort
Getter fornumberOfPointsOnXiAxis
short[]
Getter forxiValues
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setCoordinateOffsetXi
(double pCoordinateOffsetXi) Setter forcoordinateOffsetXi
setCoordinateScaleXi
(double pCoordinateScaleXi) Setter forcoordinateScaleXi
setInitialIndex
(int pInitialIndex) Utility setter forinitialIndex
setInitialIndex
(short pInitialIndex) Setter forinitialIndex
setNumberOfPointsOnXiAxis
(int pNumberOfPointsOnXiAxis) Utility setter fornumberOfPointsOnXiAxis
setNumberOfPointsOnXiAxis
(short pNumberOfPointsOnXiAxis) Setter fornumberOfPointsOnXiAxis
setXiValues
(short[] pXiValues) Setter forxiValues
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(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:
getMarshalledSize
in 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:
marshal
in classGridAxisDescriptor
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Overrides:
unmarshal
in 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:
marshal
in 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:
unmarshal
in 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:
equals
in classGridAxisDescriptor
-
equalsImpl
Description copied from class:GridAxisDescriptor
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Overrides:
equalsImpl
in classGridAxisDescriptor
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classGridAxisDescriptor
-
hashCode
public int hashCode()- Overrides:
hashCode
in classGridAxisDescriptor
-