Class OtpErlangList.SubList

    • Method Detail

      • arity

        public int arity()
        Description copied from class: OtpErlangList
        Get the arity of the list.
        Overrides:
        arity in class OtpErlangList
        Returns:
        the number of elements contained in the list.
      • elementAt

        public OtpErlangObject elementAt​(int i)
        Description copied from class: OtpErlangList
        Get the specified element from the list.
        Overrides:
        elementAt in class OtpErlangList
        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.
      • isProper

        public boolean isProper()
        Overrides:
        isProper in class OtpErlangList
        Returns:
        true if the list is proper, i.e. the last tail is nil
      • toString

        public java.lang.String toString()
        Description copied from class: OtpErlangList
        Get the string representation of the list.
        Overrides:
        toString in class OtpErlangList
        Returns:
        the string representation of the list.
      • encode

        public void encode​(OtpOutputStream stream)
        Description copied from class: OtpErlangList
        Convert 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:
        encode in class OtpErlangList
        Parameters:
        stream - An output stream to which the encoded list should be written.