Package com.github.tonivade.purefun.data
Class ImmutableArray.JavaBasedImmutableArray<E>
- java.lang.Object
-
- com.github.tonivade.purefun.data.ImmutableArray.JavaBasedImmutableArray<E>
-
- All Implemented Interfaces:
ImmutableArray<E>,Sequence<E>,com.github.tonivade.purefun.data.SequenceOf<E>,com.github.tonivade.purefun.Kind<com.github.tonivade.purefun.data.Sequence_,E>,com.github.tonivade.purefun.Witness,java.io.Serializable,java.lang.Iterable<E>
- Enclosing interface:
- ImmutableArray<E>
public static final class ImmutableArray.JavaBasedImmutableArray<E> extends java.lang.Object implements ImmutableArray<E>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.data.ImmutableArray
ImmutableArray.JavaBasedImmutableArray<E>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableArray<E>append(E element)ImmutableArray<E>appendAll(Sequence<? extends E> other)booleancontains(E element)booleanequals(java.lang.Object obj)Eget(int position)inthashCode()ImmutableArray<E>insert(int position, E element)ImmutableArray<E>insertAll(int position, Sequence<? extends E> elements)java.util.Iterator<E>iterator()ImmutableArray<E>remove(int position)ImmutableArray<E>remove(E element)ImmutableArray<E>removeAll(Sequence<? extends E> other)ImmutableArray<E>replace(int position, E element)ImmutableArray<E>reverse()intsize()ImmutableArray<E>sort(java.util.Comparator<? super E> comparator)java.util.List<E>toList()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
reverse
public ImmutableArray<E> reverse()
-
sort
public ImmutableArray<E> sort(java.util.Comparator<? super E> comparator)
- Specified by:
sortin interfaceImmutableArray<E>
-
iterator
public java.util.Iterator<E> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<E>
-
append
public ImmutableArray<E> append(E element)
-
remove
public ImmutableArray<E> remove(E element)
-
appendAll
public ImmutableArray<E> appendAll(Sequence<? extends E> other)
-
removeAll
public ImmutableArray<E> removeAll(Sequence<? extends E> other)
-
get
public E get(int position)
- Specified by:
getin interfaceImmutableArray<E>
-
replace
public ImmutableArray<E> replace(int position, E element)
- Specified by:
replacein interfaceImmutableArray<E>
-
remove
public ImmutableArray<E> remove(int position)
- Specified by:
removein interfaceImmutableArray<E>
-
insert
public ImmutableArray<E> insert(int position, E element)
- Specified by:
insertin interfaceImmutableArray<E>
-
insertAll
public ImmutableArray<E> insertAll(int position, Sequence<? extends E> elements)
- Specified by:
insertAllin interfaceImmutableArray<E>
-
toList
public java.util.List<E> toList()
- Specified by:
toListin interfaceImmutableArray<E>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-