Class Term
java.lang.Object
com.ericsson.otp.ic.Any
com.ericsson.otp.ic.Term
The Term class is intended to represent the erlang term generic type.
It extends the Any class and is basically used the same way as the Any class.
The main difference between Term and Any is the use of guard methods instead for TypeCode to determine the data included in the Term. This actual when cannot determine a Term's value class returned at compile time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTerm comparison methodAtom value extractor methodbooleanBoolean value extractor methodcharChar value extractor methoddoubleDouble value extractor methodfloatFloat value extractor methodintLong value extractor methodlongLong Long value extractor methodcom.ericsson.otp.erlang.OtpErlangObjectExtract Object value from TermbyteOctet value extractor methodPid value extractor methodPort value extractor methodRef value extractor methodshortShort value extractor methodcom.ericsson.otp.erlang.OtpInputStreamObject Stream extractor methodString value extractor methodintUnsigned Long value extractor methodlongUnsigned Long Long value extractor methodshortUnsigned Short value extractor methodcharWchar value extractor methodWstring value extractor methodvoidAtom value insertion methodvoidinsert_boolean(boolean b) Boolean value insertion methodvoidinsert_char(char c) Char value insertion methodvoidinsert_char(long l) Char value insertion methodvoidinsert_double(double d) Double value insertion methodvoidinsert_float(double f) Float value insertion methodvoidinsert_float(float f) Float value insertion methodvoidinsert_long(int i) Long value insertion methodvoidinsert_long(long l) Long value insertion methodvoidinsert_longlong(long l) Long Long value insertion methodvoidinsert_Object(com.ericsson.otp.erlang.OtpErlangObject o) Inserts Objects to Termvoidinsert_octet(byte b) Octet value insertion methodvoidinsert_octet(long l) Octet value insertion methodvoidinsert_Pid(Pid p) Pid value insertion methodvoidinsert_Port(Port p) Port value insertion methodvoidinsert_Ref(Ref r) Ref value insertion methodvoidinsert_short(long l) Short value insertion methodvoidinsert_short(short s) Short value insertion methodvoidString value insertion methodvoidinsert_ulong(int i) Unsigned Long value insertion methodvoidinsert_ulong(long l) Unsigned Long value insertion methodvoidinsert_ulonglong(long l) Unsigned Long Long value insertion methodvoidinsert_ushort(long l) Unsigned Short value insertion methodvoidinsert_ushort(short s) Unsigned Short value insertion methodvoidinsert_wchar(char c) Wchar value insertion methodvoidinsert_wchar(long l) Wchar value insertion methodvoidWstring value insertion methodbooleanisAtom()Guard methodbooleanisBinary()Guard methodbooleanGuard methodbooleanisFloat()Guard methodbooleanGuard methodbooleanisList()Guard methodbooleanisNumber()Guard methodbooleanisPid()Guard methodbooleanisPort()Guard methodbooleanGuard methodbooleanisString()Guard methodbooleanisTuple()Guard methodinttag()Tag accessor methodvoidwrite_value(com.ericsson.otp.erlang.OtpOutputStream _os) Writes the value of Term to a streamMethods inherited from class Any
equal, insert_Streamable, read_value, type, type
-
Constructor Details
-
Term
public Term()
-
-
Method Details
-
tag
public int tag()Tag accessor method- Returns:
- int, the tag of the Object that denotes the erlang external format tag
-
isAtom
public boolean isAtom()Guard method- Returns:
- true if the Term is an OtpErlangAtom, false otherwize
-
isConstant
public boolean isConstant()Guard method- Returns:
- true if the Term is not an OtpErlangList nor an OtpErlangTuple, false otherwize
-
isFloat
public boolean isFloat()Guard method- Returns:
- true if the Term is an OtpErlangFloat, false otherwize
-
isInteger
public boolean isInteger()Guard method- Returns:
- true if the Term is an OtpErlangInt, false otherwize
-
isList
public boolean isList()Guard method- Returns:
- true if the Term is an OtpErlangList, false otherwize
-
isString
public boolean isString()Guard method- Returns:
- true if the Term is an OtpErlangString, false otherwize
-
isNumber
public boolean isNumber()Guard method- Returns:
- true if the Term is an OtpErlangInteger or an OtpErlangFloat, false otherwize
-
isPid
public boolean isPid()Guard method- Returns:
- true if the Term is an OtpErlangPid or Pid, false otherwize
-
isPort
public boolean isPort()Guard method- Returns:
- true if the Term is an OtpErlangPort or Port, false otherwize
-
isReference
public boolean isReference()Guard method- Returns:
- true if the Term is an OtpErlangRef, false otherwize
-
isTuple
public boolean isTuple()Guard method- Returns:
- true if the Term is an OtpErlangTuple, false otherwize
-
isBinary
public boolean isBinary()Guard method- Returns:
- true if the Term is an OtpErlangBinary, false otherwize
-
equal
Term comparison method- Returns:
- true if the input Term is equal to the object, false otherwize
-
write_value
Writes the value of Term to a stream- Overrides:
write_valuein classAny- Throws:
Exception
-
extract_short
Short value extractor method- Overrides:
extract_shortin classAny- Returns:
- short, the value of Term
- Throws:
Exception
-
insert_short
-
insert_short
public void insert_short(long l) Short value insertion method -
extract_long
Long value extractor method- Overrides:
extract_longin classAny- Returns:
- int, the value of Term
- Throws:
Exception
-
insert_long
-
insert_long
public void insert_long(long l) Long value insertion method -
extract_longlong
Long Long value extractor method- Overrides:
extract_longlongin classAny- Returns:
- long, the value of Term
- Throws:
Exception
-
insert_longlong
public void insert_longlong(long l) Long Long value insertion method- Overrides:
insert_longlongin classAny
-
extract_ushort
Unsigned Short value extractor method- Overrides:
extract_ushortin classAny- Returns:
- short, the value of Term
- Throws:
Exception
-
insert_ushort
public void insert_ushort(short s) Unsigned Short value insertion method- Overrides:
insert_ushortin classAny
-
insert_ushort
public void insert_ushort(long l) Unsigned Short value insertion method -
extract_ulong
Unsigned Long value extractor method- Overrides:
extract_ulongin classAny- Returns:
- int, the value of Term
- Throws:
Exception
-
insert_ulong
public void insert_ulong(int i) Unsigned Long value insertion method- Overrides:
insert_ulongin classAny
-
insert_ulong
public void insert_ulong(long l) Unsigned Long value insertion method -
extract_ulonglong
Unsigned Long Long value extractor method- Overrides:
extract_ulonglongin classAny- Returns:
- long, the value of Term
- Throws:
Exception
-
insert_ulonglong
public void insert_ulonglong(long l) Unsigned Long Long value insertion method- Overrides:
insert_ulonglongin classAny
-
extract_float
Float value extractor method- Overrides:
extract_floatin classAny- Returns:
- float, the value of Term
- Throws:
Exception
-
insert_float
-
insert_float
public void insert_float(double f) Float value insertion method -
extract_double
Double value extractor method- Overrides:
extract_doublein classAny- Returns:
- double, the value of Term
- Throws:
Exception
-
insert_double
public void insert_double(double d) Double value insertion method- Overrides:
insert_doublein classAny
-
extract_boolean
Boolean value extractor method- Overrides:
extract_booleanin classAny- Returns:
- boolean, the value of Term
- Throws:
Exception
-
insert_boolean
public void insert_boolean(boolean b) Boolean value insertion method- Overrides:
insert_booleanin classAny
-
extract_char
Char value extractor method- Overrides:
extract_charin classAny- Returns:
- char, the value of Term
- Throws:
Exception
-
insert_char
-
insert_char
public void insert_char(long l) Char value insertion method -
extract_wchar
Wchar value extractor method- Overrides:
extract_wcharin classAny- Returns:
- char, the value of Term
- Throws:
Exception
-
insert_wchar
-
insert_wchar
public void insert_wchar(long l) Wchar value insertion method -
extract_octet
Octet value extractor method- Overrides:
extract_octetin classAny- Returns:
- byte, the value of Term
- Throws:
Exception
-
insert_octet
-
insert_octet
public void insert_octet(long l) Octet value insertion method -
extract_string
String value extractor method- Overrides:
extract_stringin classAny- Returns:
- String, the value of Term
- Throws:
Exception
-
insert_string
String value insertion method- Overrides:
insert_stringin classAny
-
extract_wstring
Wstring value extractor method- Overrides:
extract_wstringin classAny- Returns:
- String, the value of Term
- Throws:
Exception
-
insert_wstring
Wstring value insertion method- Overrides:
insert_wstringin classAny
-
extract_atom
Atom value extractor method- Overrides:
extract_atomin classAny- Returns:
- atom, the value of Term
- Throws:
Exception
-
insert_atom
-
extract_Pid
-
insert_Pid
Pid value insertion method -
extract_Ref
-
insert_Ref
Ref value insertion method -
extract_Port
-
insert_Port
Port value insertion method -
extract_Streamable
public com.ericsson.otp.erlang.OtpInputStream extract_Streamable()Object Stream extractor method- Overrides:
extract_Streamablein classAny- Returns:
- OtpInputStream, the stream value of Term
-
insert_Object
public void insert_Object(com.ericsson.otp.erlang.OtpErlangObject o) Inserts Objects to Term -
extract_Object
public com.ericsson.otp.erlang.OtpErlangObject extract_Object()Extract Object value from Term- Returns:
- OtpErlangObject, the Object value of Term
-