|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.proxy.Oid
This class encapsulates the Object Identifier concept - a value which is
unique to each object.
Right now, this class is just an int wrapper.
Field Summary | |
private static boolean |
initialized
Private lock for initialization of the class. |
private static int |
lastUsedOid
used to assign Oids to proxies only. |
(package private) static long |
serialVersionUID
serial version universal id - put here so Java does not insert one which may change due to revisions and make it impossible to deserialize earlier versions of serialized objects |
private int |
value
|
Constructor Summary | |
private |
Oid(int value)
Private constructor used by getNextOid() and deserialization mechanism with readFrom(). |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Overrides the Object method. |
static int |
getLastUsedOid()
Returns the value of the last used Oid It may be interesting to know how many Oids have already been given. |
static Oid |
getNextOid()
Gets the next Oid. |
int |
getValue()
Gets the integer value oh this Oid. |
int |
hashCode()
Returns a hashcode based on the value only. |
static void |
init(int pLastUsedOid)
Allows an exterior class to initialize the counter of given Oids. |
static Oid |
readFrom(BufferedRandomAccessFile in)
Reads the external representation of this object in the given file beginning where its pointer currently is. |
java.lang.String |
toString()
Returns a string representation of this object |
static void |
writeNullOid(BufferedRandomAccessFile out)
Writes a null Oid to file This method is called by Oid clients when a optional Proxy they contain isn't present and thus doesn't have an Oid. |
void |
writeTo(BufferedRandomAccessFile out)
Writes external representation of this object |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private int value
private static boolean initialized
private static int lastUsedOid
Constructor Detail |
private Oid(int value)
Method Detail |
public final int getValue()
public final java.lang.String toString()
public static final Oid getNextOid()
public static final int getLastUsedOid()
public static final void init(int pLastUsedOid)
pLastUsedOid
- the value to be used to initialize the lastUsedOidpublic final int hashCode()
public final boolean equals(java.lang.Object obj)
public static Oid readFrom(BufferedRandomAccessFile in)
in
- random access file where the Oid must be read from.public void writeTo(BufferedRandomAccessFile out)
out
- random access file handlepublic static void writeNullOid(BufferedRandomAccessFile out)
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |