Difference between revisions of "Iterable Immutable List Assignment"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
public static <E> ImmutableList<E> brackets(E... elements</nowiki> | public static <E> ImmutableList<E> brackets(E... elements</nowiki> | ||
==DefaultImmutableList== | ==DefaultImmutableList== | ||
− | {{JavaToImplement|DefaultImmutableList|head<br>tail<br>isEmpty<br>iterator|immutable.list.assignment}} | + | {{JavaToImplement|DefaultImmutableList|default constructor<br>head and tail constructor<br>head<br>tail<br>isEmpty<br>iterator|immutable.list.assignment}} |
===head=== | ===head=== | ||
===tail=== | ===tail=== |
Revision as of 08:32, 30 July 2019
Contents
Code To Implement
Lists
class: | Lists.java | |
methods: | nil cons brackets |
|
package: | immutable.list.assignment | |
source folder: | src/main/java |
nil
public static <E> ImmutableList<E> nil()
cons
public static <E> ImmutableList<E> cons(E head, ImmutableList<E> tail)
brackets
@SafeVarargs public static <E> ImmutableList<E> brackets(E... elements
DefaultImmutableList
class: | DefaultImmutableList.java | |
methods: | default constructor head and tail constructor head tail isEmpty iterator |
|
package: | immutable.list.assignment | |
source folder: | src/main/java |
head
tail
isEmpty
iterator
Test
class: | ListsTestSuite.java | |
package: | immutable.list.assignment | |
source folder: | src/test/java |