java.lang.Object
speiger.src.collections.bytes.utils.ByteLists
A Helper class for Lists
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic speiger.src.collections.bytes.utils.ByteLists.EmptyListempty()Returns a Immutable EmptyList instance that is automatically casted.static ByteListReverses the liststatic ByteListShuffles the liststatic ByteListshuffle(ByteList list, RandomGenerator random) Shuffles the liststatic ByteListsingleton(byte element) Creates a Unmodifiable Singleton liststatic ByteListReturns a synchronized List instance based on the instance given.static ByteListsynchronize(ByteList l, Object mutex) Returns a synchronized List instance based on the instance given.static ByteListReturns a Immutable List instance based on the instance given.
-
Konstruktordetails
-
ByteLists
public ByteLists()
-
-
Methodendetails
-
empty
public static speiger.src.collections.bytes.utils.ByteLists.EmptyList empty()Returns a Immutable EmptyList instance that is automatically casted.- Gibt zurück:
- an empty list
-
unmodifiable
Returns a Immutable List instance based on the instance given.- Parameter:
l- that should be made immutable/unmodifiable- Gibt zurück:
- a unmodifiable list wrapper. If the list is implementing RandomAccess that is also transferred. If the List already a unmodifiable wrapper then it just returns itself.
-
synchronize
Returns a synchronized List instance based on the instance given.- Parameter:
l- that should be synchronized- Gibt zurück:
- a synchronized list wrapper. If the list is implementing RandomAccess or IByteArray that is also transferred. If the List already a synchronized wrapper then it just returns itself.
-
synchronize
Returns a synchronized List instance based on the instance given.- Parameter:
l- that should be synchronizedmutex- is the controller of the synchronization block.- Gibt zurück:
- a synchronized list wrapper. If the list is implementing RandomAccess or IByteArray that is also transferred. If the List already a synchronized wrapper then it just returns itself.
-
singleton
Creates a Unmodifiable Singleton list- Parameter:
element- that should be used in the Singleton- Gibt zurück:
- a singleton list that is unmodifiable
-
reverse
Reverses the list- Parameter:
list- that should be reversed.- Gibt zurück:
- the input list
-
shuffle
Shuffles the list- Parameter:
list- that should be Shuffled.- Gibt zurück:
- the input list
-
shuffle
Shuffles the list- Parameter:
list- that should be Shuffled.random- the random that should be used- Gibt zurück:
- the input list
-