Class Environment
java.lang.Object
edu.nps.moves.dis7.pdus.Environment
- All Implemented Interfaces:
Serializable
Information about a geometry, a state associated with a geometry, a bounding volume, or an associated entity ID. 6.2.31, not fully defined. 'The current definitions can be found in DIS PCR 240'
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EnvironmentalProcessRecordType
Record type uid 250protected byte[]
Geometry or state recordprotected byte
Identify the sequentially numbered record indexprotected short
length, in bitsprotected byte
padding -
Constructor Summary
Constructors -
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 objectGetter forenvironmentType
byte[]
Getter forgeometry
byte
getIndex()
Getter forindex
short
Getter forlength
int
Returns size of this serialized (marshalled) object in bytesbyte
Getter forpadding1
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setEnvironmentType
(EnvironmentalProcessRecordType pEnvironmentType) Setter forenvironmentType
setGeometry
(byte[] pGeometry) Setter forgeometry
setIndex
(byte pIndex) Setter forindex
setIndex
(int pIndex) Utility setter forindex
setLength
(int pLength) Utility setter forlength
setLength
(short pLength) Setter forlength
setPadding1
(byte pPadding1) Setter forpadding1
setPadding1
(int pPadding1) Utility setter forpadding1
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
Field Details
-
environmentType
Record type uid 250 -
length
protected short lengthlength, in bits -
index
protected byte indexIdentify the sequentially numbered record index -
padding1
protected byte padding1padding -
geometry
protected byte[] geometryGeometry or state record
-
-
Constructor Details
-
Environment
public Environment()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
-
setEnvironmentType
Setter forenvironmentType
- Parameters:
pEnvironmentType
- new value of interest- Returns:
- same object to permit progressive setters
-
getEnvironmentType
Getter forenvironmentType
- Returns:
- value of interest
-
setLength
Setter forlength
- Parameters:
pLength
- new value of interest- Returns:
- same object to permit progressive setters
-
setLength
Utility setter forlength
- Parameters:
pLength
- new value of interest- Returns:
- same object to permit progressive setters
-
getLength
-
setIndex
Setter forindex
- Parameters:
pIndex
- new value of interest- Returns:
- same object to permit progressive setters
-
setIndex
Utility setter forindex
- Parameters:
pIndex
- new value of interest- Returns:
- same object to permit progressive setters
-
getIndex
-
setPadding1
Setter forpadding1
- Parameters:
pPadding1
- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding1
Utility setter forpadding1
- Parameters:
pPadding1
- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding1
-
setGeometry
Setter forgeometry
- Parameters:
pGeometry
- new value of interest- Returns:
- same object to permit progressive setters
-
getGeometry
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- 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.- 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.- 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
-
equalsImpl
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-