Class PList.Cons<A>

java.lang.Object
ch.bluecare.commons.data.PList<A>
ch.bluecare.commons.data.PList.Cons<A>
All Implemented Interfaces:
Iterable<A>, IntFunction<A>
Enclosing class:
PList<E>

public static final class PList.Cons<A> extends PList<A>
  • Method Details

    • size

      public int size()
      Description copied from class: PList
      Return the size of this list. The size is cached and doesn't require to traverse the list.
      Specified by:
      size in class PList<A>
    • tail

      public PList<A> tail()
      Description copied from class: PList
      Returns the tail of this list, that is without first element.
      Specified by:
      tail in class PList<A>
    • head

      public A head()
      Description copied from class: PList
      Return the first element (the head) of this list. An exception is thrown if this is the empty list.
      Specified by:
      head in class PList<A>
    • isEmpty

      public boolean isEmpty()
      Description copied from class: PList
      Check whether this is the empty list.
      Specified by:
      isEmpty in class PList<A>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class PList<A>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PList<A>