Class FList.Nil<E>

  • Type Parameters:
    E - the element type (used in type inference)
    All Implemented Interfaces:
    Serializable, Iterable<E>
    Enclosing class:
    FList<E>

    public static final class FList.Nil<E>
    extends FList<E>
    Class for the empty list.
    See Also:
    Serialized Form
    • Constructor Detail

      • Nil

        private Nil()
        Private constructor.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns true as this represents the empty list.
        Specified by:
        isEmpty in class FList<E>
        Returns:
        true
      • size

        public int size()
        Returns 0 as size of the empty list.
        Specified by:
        size in class FList<E>
        Returns:
        0