Package com.ericsson.otp.erlang
Class OtpErlangObject
- java.lang.Object
- 
- com.ericsson.otp.erlang.OtpErlangObject
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 - Direct Known Subclasses:
- OtpErlangAtom,- OtpErlangBitstr,- OtpErlangDouble,- OtpErlangExternalFun,- OtpErlangFun,- OtpErlangList,- OtpErlangLong,- OtpErlangMap,- OtpErlangPid,- OtpErlangPort,- OtpErlangRef,- OtpErlangString,- OtpErlangTuple
 
 public abstract class OtpErlangObject extends java.lang.Object implements java.io.Serializable, java.lang.CloneableBase class of the Erlang data type classes. This class is used to represent an arbitrary Erlang term.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classOtpErlangObject.Hash
 - 
Field SummaryFields Modifier and Type Field Description protected inthashCodeValue
 - 
Constructor SummaryConstructors Constructor Description OtpErlangObject()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> OtpErlangObjectbind(T binds)Make new Erlang term replacing variables with the respective values from bindings argument(s).java.lang.Objectclone()static OtpErlangObjectdecode(OtpInputStream buf)Read binary data in the Erlang external format, and produce a corresponding Erlang data type object.protected intdoHashCode()abstract voidencode(OtpOutputStream buf)Convert the object according to the rules of the Erlang external format.abstract booleanequals(java.lang.Object o)Determine if two Erlang objects are equal.inthashCode()<T> booleanmatch(OtpErlangObject term, T binds)Perform match operation against given term.abstract java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
toStringpublic abstract java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
- Returns:
- the printable representation of the object. This is usually similar to the representation used by Erlang for the same type of object.
 
 - 
encodepublic abstract void encode(OtpOutputStream buf) Convert the object according to the rules of the Erlang external format. This is mainly used for sending Erlang terms in messages, however it can also be used for storing terms to disk.- Parameters:
- buf- an output stream to which the encoded term should be written.
 
 - 
decodepublic static OtpErlangObject decode(OtpInputStream buf) throws OtpErlangDecodeException Read binary data in the Erlang external format, and produce a corresponding Erlang data type object. This method is normally used when Erlang terms are received in messages, however it can also be used for reading terms from disk.- Parameters:
- buf- an input stream containing one or more encoded Erlang terms.
- Returns:
- an object representing one of the Erlang data types.
- Throws:
- OtpErlangDecodeException- if the stream does not contain a valid representation of an Erlang term.
 
 - 
equalspublic abstract boolean equals(java.lang.Object o) Determine if two Erlang objects are equal. In general, Erlang objects are equal if the components they consist of are equal.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- o- the object to compare to.
- Returns:
- true if the objects are identical.
 
 - 
matchpublic <T> boolean match(OtpErlangObject term, T binds) Perform match operation against given term.- Parameters:
- term- the object to match
- binds- variable bindings
- Returns:
- true if match succeeded
 
 - 
bindpublic <T> OtpErlangObject bind(T binds) throws OtpErlangException Make new Erlang term replacing variables with the respective values from bindings argument(s).- Parameters:
- binds- variable bindings
- Returns:
- new term
- Throws:
- OtpErlangException
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
doHashCodeprotected int doHashCode() 
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.lang.Object
 
 
- 
 
-