Class PList.Nil

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

public static final class PList.Nil extends PList<Object>
  • 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<Object>
    • tail

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

      public Object 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<Object>
    • isEmpty

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

      public PList<Object> reverse()
      Description copied from class: PList
      Reverse the order of this list.
      Overrides:
      reverse in class PList<Object>
    • map

      public <B> PList<B> map(Function<Object,B> f)
      Description copied from class: PList
      Apply f to each element in this list, returning a new list preserving this structure.
      Overrides:
      map in class PList<Object>
    • flatMap

      public <B> PList<B> flatMap(Function<Object,Iterable<B>> f)
      Description copied from class: PList
      Apply f to each element in the list and concatenate the results.
      Overrides:
      flatMap in class PList<Object>
    • concat

      public PList<Object> concat(PList<Object> next)
      Description copied from class: PList
      Concatenates the given list onto this list.
      Overrides:
      concat in class PList<Object>
    • equals

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

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