Package net.apartium.cocoabeans.collect
Class ImmutableByteArrayList
java.lang.Object
net.apartium.cocoabeans.collect.ImmutableByteArrayList
A basic, immutable list-like object which does not make use of the wrapper type to function.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(byte value) booleanvoidforEach(ByteConsumer consumer) byteget(int index) inthashCode()intindexOf(byte value) booleanisEmpty()iterator()intlastIndexOf(byte value) static ImmutableByteArrayListmakeBetter(Collection<Byte> c) Unwrap Byte collection as this typestatic ImmutableByteArrayListof()Returns an empty instance.static ImmutableByteArrayListof(byte... values) Constructs a new instance of ImmutableByteArrayList with given valuesintsize()stream()byte[]toArray()toString()
-
Method Details
-
of
Returns an empty instance.- Returns:
- empty instance
-
of
Constructs a new instance of ImmutableByteArrayList with given values- Parameters:
values- given values- Returns:
- a new instance consisting of given values in array
-
makeBetter
Unwrap Byte collection as this type- Parameters:
c- collection- Returns:
- a new instance consisting of given values in collection
-
size
public int size()- See Also:
-
isEmpty
public boolean isEmpty()- See Also:
-
contains
public boolean contains(byte value) - See Also:
-
iterator
- See Also:
-
forEach
- See Also:
-
stream
- See Also:
-
toArray
public byte[] toArray()- See Also:
-
get
public byte get(int index) - See Also:
-
indexOf
public int indexOf(byte value) - See Also:
-
lastIndexOf
public int lastIndexOf(byte value) - See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-