public class OtpErlangAtom extends OtpErlangObject implements java.io.Serializable, java.lang.Cloneable
maxAtomLength
characters.OtpErlangObject.Hash
限定符和类型 | 字段和说明 |
---|---|
static int |
maxAtomLength
The maximun allowed length of an atom, in characters
|
hashCodeValue
构造器和说明 |
---|
OtpErlangAtom(boolean t)
Create an atom whose value is "true" or "false".
|
OtpErlangAtom(OtpInputStream buf)
Create an atom from a stream containing an atom encoded in Erlang
external format.
|
OtpErlangAtom(java.lang.String atom)
Create an atom from the given string.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
atomValue()
Get the actual string contained in this object.
|
boolean |
booleanValue()
The boolean value of this atom.
|
protected int |
doHashCode() |
void |
encode(OtpOutputStream buf)
Convert this atom to the equivalent Erlang external representation.
|
boolean |
equals(java.lang.Object o)
Determine if two atoms are equal.
|
java.lang.String |
toString()
Get the printname of the atom represented by this object.
|
clone, decode, hashCode
public static final int maxAtomLength
public OtpErlangAtom(java.lang.String atom)
atom
- the string to create the atom from.java.lang.IllegalArgumentException
- if the string is null or contains more than
maxAtomLength
characters.public OtpErlangAtom(OtpInputStream buf) throws OtpErlangDecodeException
buf
- the stream containing the encoded atom.OtpErlangDecodeException
- if the buffer does not contain a valid external
representation of an Erlang atom.public OtpErlangAtom(boolean t)
public java.lang.String atomValue()
toString()
public boolean booleanValue()
public java.lang.String toString()
toString
在类中 OtpErlangObject
atomValue()
public boolean equals(java.lang.Object o)
equals
在类中 OtpErlangObject
o
- the other object to compare to.protected int doHashCode()
doHashCode
在类中 OtpErlangObject
public void encode(OtpOutputStream buf)
encode
在类中 OtpErlangObject
buf
- an output stream to which the encoded atom should be
written.