Package com.ericsson.otp.erlang
Class OtpErlangList.SubList
java.lang.Object
com.ericsson.otp.erlang.OtpErlangObject
com.ericsson.otp.erlang.OtpErlangList
com.ericsson.otp.erlang.OtpErlangList.SubList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<OtpErlangObject>
- Enclosing class:
OtpErlangList
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ericsson.otp.erlang.OtpErlangList
OtpErlangList.SubListNested classes/interfaces inherited from class com.ericsson.otp.erlang.OtpErlangObject
OtpErlangObject.Hash -
Field Summary
Fields inherited from class com.ericsson.otp.erlang.OtpErlangObject
hashCodeValue -
Method Summary
Modifier and TypeMethodDescriptionintarity()Get the arity of the list.elementAt(int i) Get the specified element from the list.elements()Get all the elements from the list as an array.voidencode(OtpOutputStream stream) Convert this list to the equivalent Erlang external representation.getHead()getNthTail(int n) booleanisProper()iterator()toString()Get the string representation of the list.Methods inherited from class com.ericsson.otp.erlang.OtpErlangList
bind, clone, doHashCode, encode, equals, getTail, match, stringValue, toStringMethods inherited from class com.ericsson.otp.erlang.OtpErlangObject
decode, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
arity
public int arity()Description copied from class:OtpErlangListGet the arity of the list.- Overrides:
arityin classOtpErlangList- Returns:
- the number of elements contained in the list.
-
elementAt
Description copied from class:OtpErlangListGet the specified element from the list.- Overrides:
elementAtin classOtpErlangList- Parameters:
i- the index of the requested element. List elements are numbered as array elements, starting at 0.- Returns:
- the requested element, of null if i is not a valid element index.
-
elements
Description copied from class:OtpErlangListGet all the elements from the list as an array.- Overrides:
elementsin classOtpErlangList- Returns:
- an array containing all of the list's elements.
-
isProper
public boolean isProper()- Overrides:
isProperin classOtpErlangList- Returns:
- true if the list is proper, i.e. the last tail is nil
-
getHead
- Overrides:
getHeadin classOtpErlangList
-
getNthTail
- Overrides:
getNthTailin classOtpErlangList
-
toString
Description copied from class:OtpErlangListGet the string representation of the list.- Overrides:
toStringin classOtpErlangList- Returns:
- the string representation of the list.
-
encode
Description copied from class:OtpErlangListConvert this list to the equivalent Erlang external representation. Note that this method never encodes lists as strings, even when it is possible to do so.- Overrides:
encodein classOtpErlangList- Parameters:
stream- An output stream to which the encoded list should be written.
-
getLastTail
- Overrides:
getLastTailin classOtpErlangList
-
iterator
- Specified by:
iteratorin interfaceIterable<OtpErlangObject>- Overrides:
iteratorin classOtpErlangList
-