Package at.jku.ssw.fp.coll
Class FList.Nil<E>
- java.lang.Object
-
- at.jku.ssw.fp.coll.FList<E>
-
- at.jku.ssw.fp.coll.FList.Nil<E>
-
- Type Parameters:
E
- the element type (used in type inference)
- All Implemented Interfaces:
Serializable
,Iterable<E>
public static final class FList.Nil<E> extends FList<E>
Class for the empty list.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class at.jku.ssw.fp.coll.FList
FList.Builder<E>, FList.Cons<E>, FList.Nil<E>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Nil()
Private constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
head()
Throws aNoSuchElementException
.boolean
isEmpty()
Returnstrue
as this represents the empty list.int
size()
Returns0
as size of the empty list.FList<E>
tail()
Throws aNoSuchElementException
.-
Methods inherited from class at.jku.ssw.fp.coll.FList
add, contains, empty, filter, find, flatMap, forEach, generate, get, iterator, map, of, parallelStream, reduce, reduce, remove, removeIdx, replaceIdx, reverse, stream, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
spliterator
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Returnstrue
as this represents the empty list.
-
size
public int size()
Returns0
as size of the empty list.
-
head
public E head()
Throws aNoSuchElementException
.
-
-