public class Munition
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected MunitionExpendableStatus |
munitionStatus
the status of the munition.
|
protected EntityType |
munitionType
This field shall identify the entity type of the munition.
|
protected byte |
padding
padding
|
protected short |
quantity
the quantity remaining of this munition.
|
protected int |
station
the station or launcher to which the munition is assigned.
|
Constructor and Description |
---|
Munition()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsImpl(java.lang.Object obj)
Compare all fields that contribute to the state, ignoring
transient and static fields, for
this and the supplied object |
int |
getMarshalledSize()
Returns the size of this serialized object in bytes
|
MunitionExpendableStatus |
getMunitionStatus()
Getter for
munitionStatus |
EntityType |
getMunitionType()
Getter for
munitionType |
byte |
getPadding()
Getter for
padding |
short |
getQuantity()
Getter for
quantity |
int |
getStation()
Getter for
station |
void |
marshal(java.nio.ByteBuffer buff)
Packs an object into the ByteBuffer.
|
void |
marshal(java.io.DataOutputStream dos)
Serializes an object to a DataOutputStream.
|
Munition |
setMunitionStatus(MunitionExpendableStatus pMunitionStatus)
Setter for
munitionStatus |
Munition |
setMunitionType(EntityType pMunitionType)
Setter for
munitionType |
Munition |
setPadding(byte pPadding)
Setter for
padding |
Munition |
setQuantity(short pQuantity)
Setter for
quantity |
Munition |
setStation(int pStation)
Setter for
station |
int |
unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.
|
int |
unmarshal(java.io.DataInputStream dis)
Unserializes an object from a DataInputStream.
|
protected EntityType munitionType
protected int station
protected short quantity
protected MunitionExpendableStatus munitionStatus
protected byte padding
public int getMarshalledSize()
public Munition setMunitionType(EntityType pMunitionType)
munitionType
public EntityType getMunitionType()
munitionType
public int getStation()
station
public short getQuantity()
quantity
public Munition setMunitionStatus(MunitionExpendableStatus pMunitionStatus)
munitionStatus
public MunitionExpendableStatus getMunitionStatus()
munitionStatus
public byte getPadding()
padding
public void marshal(java.io.DataOutputStream dos)
dos
- The DataOutputStreamDataOutputStream
public int unmarshal(java.io.DataInputStream dis)
dis
- The DataInputStreamDataInputStream
public void marshal(java.nio.ByteBuffer buff) throws java.lang.Exception
buff
- The ByteBuffer at the position to begin writingjava.nio.BufferOverflowException
- if buff is too smalljava.nio.ReadOnlyBufferException
- if buff is read onlyjava.lang.Exception
- ByteBuffer-generated exceptionByteBuffer
public int unmarshal(java.nio.ByteBuffer buff) throws java.lang.Exception
buff
- The ByteBuffer at the position to begin readingjava.nio.BufferUnderflowException
- if buff is too smalljava.lang.Exception
- ByteBuffer-generated exceptionByteBuffer
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsImpl(java.lang.Object obj)
this
and the supplied objectobj
- the object to compare to