public class ConfERef extends ConfEObject implements Serializable, Cloneable
Constructor and Description |
---|
ConfERef(ConfInputStream buf)
Create an E ref from a stream containing a ref encoded in E external
format.
|
ConfERef(String node,
int[] ids,
int creation)
Create a new style E ref from its components.
|
ConfERef(String node,
int id,
int creation)
Create an old style E ref from its components.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
int |
creation()
Get the creation number from the ref.
|
void |
encode(ConfOutputStream buf)
Convert this ref to the equivalent E external representation.
|
boolean |
equals(Object o)
Determine if two refs are equal.
|
int |
hashCode() |
int |
id()
Get the id number from the ref.
|
int[] |
ids()
Get the array of id numbers from the ref.
|
boolean |
isNewRef()
Determine whether this is a new style ref.
|
String |
node()
Get the node name from the ref.
|
String |
toString()
Get the string representation of the ref.
|
decode
public ConfERef(ConfInputStream buf) throws ConfEDecodeException
buf
- the stream containing the encoded ref.ConfEDecodeException
- if the buffer does not contain a valid external
representation of an E ref.public ConfERef(String node, int id, int creation)
node
- the nodename.id
- an arbitrary number. Only the low order 18 bits will be used.creation
- another arbitrary number. Only the low order 2 bits will be
used.public ConfERef(String node, int[] ids, int creation)
node
- the nodename.ids
- an array of arbitrary numbers. Only the low order 18 bits of
the first number will be used. If the array contains only one
number, an old style ref will be written instead. At most
three numbers will be read from the array.creation
- another arbitrary number. Only the low order 2 bits will be
used.public int id()
public int[] ids()
public boolean isNewRef()
public int creation()
public String node()
public String toString()
toString
in class ConfEObject
public void encode(ConfOutputStream buf)
encode
in class ConfEObject
buf
- an output stream to which the encoded ref should be written.public boolean equals(Object o)
equals
in class ConfEObject
o
- the other ref to compare to.public Object clone()
clone
in class ConfEObject