|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmil.navy.nps.dis.PduElement
mil.navy.nps.dis.EntityID
Record uniquely identifying an entity.
ProtocolDataUnit
,
PduElement
,
SerializationInterface
Field Summary | |
protected UnsignedShort |
applicationID
Application at that site this came from. |
protected UnsignedShort |
entityID
Entity within the current application. |
static int |
SHORT_HIGH_BYTE_MASK
|
static int |
SHORT_LOW_BYTE_MASK
|
protected UnsignedShort |
siteID
Site the entity came from. |
Constructor Summary | |
EntityID()
Default constructor--fills with zeros for all values. |
|
EntityID(int pSiteID,
int pApplicationID,
int pEntityID)
Constructs a new Entity Identifier, with variables values passed in parameters. |
|
EntityID(short pSiteID,
short pApplicationID,
short pEntityID)
Constructs a new Entity Identifier, with variables values passed in parameters. |
Method Summary | |
java.lang.Object |
clone()
Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data. |
void |
deSerialize(java.io.DataInputStream inputStream)
Deserialize our data from the input stream. |
boolean |
equals(java.lang.Object obj)
Makes a "numeric equality" test. |
UnsignedShort |
getApplicationID()
|
UnsignedShort |
getEntityID()
|
UnsignedShort |
getSiteID()
|
int |
hashCode()
This provides a hash code for the object. |
int |
length()
Returns the length of the object when serialized in a stream. |
void |
printValues(int indentLevel,
java.io.PrintStream printStream)
Prints the generated serialized object for debugging. |
void |
serialize(java.io.DataOutputStream outputStream)
Serialize our data out to the stream. |
void |
setApplicationID(int pApplicationID)
|
void |
setApplicationID(UnsignedShort pApplicationID)
|
void |
setEntityID(int pEntityID)
|
void |
setEntityID(UnsignedShort pEntityID)
|
void |
setSiteID(int pSiteID)
|
void |
setSiteID(UnsignedShort pSiteID)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SHORT_HIGH_BYTE_MASK
public static final int SHORT_LOW_BYTE_MASK
protected UnsignedShort siteID
protected UnsignedShort applicationID
protected UnsignedShort entityID
Constructor Detail |
public EntityID()
public EntityID(short pSiteID, short pApplicationID, short pEntityID)
pSiteID
- the Site IdentifierpApplicationID
- the Application Identifier for that sitepEntityID
- the Entity identifier for that applicationpublic EntityID(int pSiteID, int pApplicationID, int pEntityID)
pSiteID
- the Site IdentifierpApplicationID
- the Application Identifier for that sitepEntityID
- the Entity identifier for that applicationMethod Detail |
public java.lang.Object clone()
PduElement
clone
in class PduElement
Object
public void serialize(java.io.DataOutputStream outputStream)
PduElement
super.Serialize()
to make sure
the superclasse's data is serialized out. The order
in which instance variables are serialized is significant. They must
be serialized in the same order they appear in the DIS
spec.
Prints out some information during execution if debugging flag is set.
serialize
in interface SerializationInterface
serialize
in class PduElement
outputStream
- the stream to which this object is serializedpublic void deSerialize(java.io.DataInputStream inputStream)
PduElement
super.deSerialize
to make sure
the superclass's data are properly affected. The order
in which instance variables are serialized is significant. They must
be deSerialized in the same order as they have been serialized as specified by the DIS spec.
deSerialize
in interface SerializationInterface
deSerialize
in class PduElement
inputStream
- the stream from which this object is initializedpublic int length()
PduElement
length
in class PduElement
public void printValues(int indentLevel, java.io.PrintStream printStream)
PduElement
printValues
in class PduElement
indentLevel
- number of spaces to indent for visibilitypublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj
- the object want to be compared with this object.
public UnsignedShort getSiteID()
public void setSiteID(UnsignedShort pSiteID)
public void setSiteID(int pSiteID)
public UnsignedShort getApplicationID()
public void setApplicationID(UnsignedShort pApplicationID)
public void setApplicationID(int pApplicationID)
public UnsignedShort getEntityID()
public void setEntityID(UnsignedShort pEntityID)
public void setEntityID(int pEntityID)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |