Package com.ericsson.otp.ic
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 TypeMethodDescriptionboolean
Term comparison methodAtom value extractor methodboolean
Boolean value extractor methodchar
Char value extractor methoddouble
Double value extractor methodfloat
Float value extractor methodint
Long value extractor methodlong
Long Long value extractor methodcom.ericsson.otp.erlang.OtpErlangObject
Extract Object value from Termbyte
Octet value extractor methodPid value extractor methodPort value extractor methodRef value extractor methodshort
Short value extractor methodcom.ericsson.otp.erlang.OtpInputStream
Object Stream extractor methodString value extractor methodint
Unsigned Long value extractor methodlong
Unsigned Long Long value extractor methodshort
Unsigned Short value extractor methodchar
Wchar value extractor methodWstring value extractor methodvoid
Atom value insertion methodvoid
insert_boolean
(boolean b) Boolean value insertion methodvoid
insert_char
(char c) Char value insertion methodvoid
insert_char
(long l) Char value insertion methodvoid
insert_double
(double d) Double value insertion methodvoid
insert_float
(double f) Float value insertion methodvoid
insert_float
(float f) Float value insertion methodvoid
insert_long
(int i) Long value insertion methodvoid
insert_long
(long l) Long value insertion methodvoid
insert_longlong
(long l) Long Long value insertion methodvoid
insert_Object
(com.ericsson.otp.erlang.OtpErlangObject o) Inserts Objects to Termvoid
insert_octet
(byte b) Octet value insertion methodvoid
insert_octet
(long l) Octet value insertion methodvoid
insert_Pid
(Pid p) Pid value insertion methodvoid
insert_Port
(Port p) Port value insertion methodvoid
insert_Ref
(Ref r) Ref value insertion methodvoid
insert_short
(long l) Short value insertion methodvoid
insert_short
(short s) Short value insertion methodvoid
String value insertion methodvoid
insert_ulong
(int i) Unsigned Long value insertion methodvoid
insert_ulong
(long l) Unsigned Long value insertion methodvoid
insert_ulonglong
(long l) Unsigned Long Long value insertion methodvoid
insert_ushort
(long l) Unsigned Short value insertion methodvoid
insert_ushort
(short s) Unsigned Short value insertion methodvoid
insert_wchar
(char c) Wchar value insertion methodvoid
insert_wchar
(long l) Wchar value insertion methodvoid
Wstring value insertion methodboolean
isAtom()
Guard methodboolean
isBinary()
Guard methodboolean
Guard methodboolean
isFloat()
Guard methodboolean
Guard methodboolean
isList()
Guard methodboolean
isNumber()
Guard methodboolean
isPid()
Guard methodboolean
isPort()
Guard methodboolean
Guard methodboolean
isString()
Guard methodboolean
isTuple()
Guard methodint
tag()
Tag accessor methodvoid
write_value
(com.ericsson.otp.erlang.OtpOutputStream _os) Writes the value of Term to a streamMethods inherited from class com.ericsson.otp.ic.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_value
in classAny
- Throws:
Exception
-
extract_short
Short value extractor method- Overrides:
extract_short
in classAny
- Returns:
- short, the value of Term
- Throws:
Exception
-
insert_short
public void insert_short(short s) Short value insertion method- Overrides:
insert_short
in classAny
-
insert_short
public void insert_short(long l) Short value insertion method -
extract_long
Long value extractor method- Overrides:
extract_long
in classAny
- Returns:
- int, the value of Term
- Throws:
Exception
-
insert_long
public void insert_long(int i) Long value insertion method- Overrides:
insert_long
in classAny
-
insert_long
public void insert_long(long l) Long value insertion method -
extract_longlong
Long Long value extractor method- Overrides:
extract_longlong
in classAny
- Returns:
- long, the value of Term
- Throws:
Exception
-
insert_longlong
public void insert_longlong(long l) Long Long value insertion method- Overrides:
insert_longlong
in classAny
-
extract_ushort
Unsigned Short value extractor method- Overrides:
extract_ushort
in classAny
- Returns:
- short, the value of Term
- Throws:
Exception
-
insert_ushort
public void insert_ushort(short s) Unsigned Short value insertion method- Overrides:
insert_ushort
in classAny
-
insert_ushort
public void insert_ushort(long l) Unsigned Short value insertion method -
extract_ulong
Unsigned Long value extractor method- Overrides:
extract_ulong
in classAny
- Returns:
- int, the value of Term
- Throws:
Exception
-
insert_ulong
public void insert_ulong(int i) Unsigned Long value insertion method- Overrides:
insert_ulong
in classAny
-
insert_ulong
public void insert_ulong(long l) Unsigned Long value insertion method -
extract_ulonglong
Unsigned Long Long value extractor method- Overrides:
extract_ulonglong
in 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_ulonglong
in classAny
-
extract_float
Float value extractor method- Overrides:
extract_float
in classAny
- Returns:
- float, the value of Term
- Throws:
Exception
-
insert_float
public void insert_float(float f) Float value insertion method- Overrides:
insert_float
in classAny
-
insert_float
public void insert_float(double f) Float value insertion method -
extract_double
Double value extractor method- Overrides:
extract_double
in classAny
- Returns:
- double, the value of Term
- Throws:
Exception
-
insert_double
public void insert_double(double d) Double value insertion method- Overrides:
insert_double
in classAny
-
extract_boolean
Boolean value extractor method- Overrides:
extract_boolean
in classAny
- Returns:
- boolean, the value of Term
- Throws:
Exception
-
insert_boolean
public void insert_boolean(boolean b) Boolean value insertion method- Overrides:
insert_boolean
in classAny
-
extract_char
Char value extractor method- Overrides:
extract_char
in classAny
- Returns:
- char, the value of Term
- Throws:
Exception
-
insert_char
public void insert_char(char c) Char value insertion method- Overrides:
insert_char
in classAny
-
insert_char
public void insert_char(long l) Char value insertion method -
extract_wchar
Wchar value extractor method- Overrides:
extract_wchar
in classAny
- Returns:
- char, the value of Term
- Throws:
Exception
-
insert_wchar
public void insert_wchar(char c) Wchar value insertion method- Overrides:
insert_wchar
in classAny
-
insert_wchar
public void insert_wchar(long l) Wchar value insertion method -
extract_octet
Octet value extractor method- Overrides:
extract_octet
in classAny
- Returns:
- byte, the value of Term
- Throws:
Exception
-
insert_octet
public void insert_octet(byte b) Octet value insertion method- Overrides:
insert_octet
in classAny
-
insert_octet
public void insert_octet(long l) Octet value insertion method -
extract_string
String value extractor method- Overrides:
extract_string
in classAny
- Returns:
- String, the value of Term
- Throws:
Exception
-
insert_string
String value insertion method- Overrides:
insert_string
in classAny
-
extract_wstring
Wstring value extractor method- Overrides:
extract_wstring
in classAny
- Returns:
- String, the value of Term
- Throws:
Exception
-
insert_wstring
Wstring value insertion method- Overrides:
insert_wstring
in classAny
-
extract_atom
Atom value extractor method- Overrides:
extract_atom
in classAny
- Returns:
- atom, the value of Term
- Throws:
Exception
-
insert_atom
Atom value insertion method- Overrides:
insert_atom
in classAny
-
extract_Pid
Pid value extractor method- Returns:
- Pid, the value of Term
- Throws:
Exception
-
insert_Pid
Pid value insertion method -
extract_Ref
Ref value extractor method- Returns:
- Ref, the value of Term
- Throws:
Exception
-
insert_Ref
Ref value insertion method -
extract_Port
Port value extractor method- Returns:
- Port, the value of Term
- Throws:
Exception
-
insert_Port
Port value insertion method -
extract_Streamable
public com.ericsson.otp.erlang.OtpInputStream extract_Streamable()Object Stream extractor method- Overrides:
extract_Streamable
in 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
-