Package it.unimi.dsi.fastutil.longs
Class LongBigLists
- java.lang.Object
-
- it.unimi.dsi.fastutil.longs.LongBigLists
-
public final class LongBigLists extends Object
A class providing static methods and objects that do useful things with type-specific big lists.- See Also:
Collections,BigList
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLongBigLists.EmptyBigListAn immutable class representing an empty type-specific big list.static classLongBigLists.ListBigListA class exposing a list as a big list.static classLongBigLists.SingletonAn immutable class representing a type-specific singleton big list.static classLongBigLists.SynchronizedBigListA synchronized wrapper class for big lists.static classLongBigLists.UnmodifiableBigListAn unmodifiable wrapper class for big lists.
-
Field Summary
Fields Modifier and Type Field Description static LongBigLists.EmptyBigListEMPTY_BIG_LISTAn empty big list (immutable).
-
Method Summary
Modifier and Type Method Description static LongBigListasBigList(LongList list)Returns a big list backed by the specified list.static LongBigListshuffle(LongBigList l, Random random)Shuffles the specified big list using the specified pseudorandom number generator.static LongBigListsingleton(long element)Returns a type-specific immutable big list containing only the specified element.static LongBigListsingleton(Object element)Returns a type-specific immutable big list containing only the specified element.static LongBigListsynchronize(LongBigList l)Returns a synchronized type-specific big list backed by the given type-specific big list.static LongBigListsynchronize(LongBigList l, Object sync)Returns a synchronized type-specific big list backed by the given type-specific big list, using an assigned object to synchronize.static LongBigListunmodifiable(LongBigList l)Returns an unmodifiable type-specific big list backed by the given type-specific big list.
-
-
-
Field Detail
-
EMPTY_BIG_LIST
public static final LongBigLists.EmptyBigList EMPTY_BIG_LIST
An empty big list (immutable). It is serializable and cloneable.
-
-
Method Detail
-
shuffle
public static LongBigList shuffle(LongBigList l, Random random)
Shuffles the specified big list using the specified pseudorandom number generator.- Parameters:
l- the big list to be shuffled.random- a pseudorandom number generator.- Returns:
l.
-
singleton
public static LongBigList singleton(long element)
Returns a type-specific immutable big list containing only the specified element. The returned big list is serializable and cloneable.- Parameters:
element- the only element of the returned big list.- Returns:
- a type-specific immutable big list containing just
element.
-
singleton
public static LongBigList singleton(Object element)
Returns a type-specific immutable big list containing only the specified element. The returned big list is serializable and cloneable.- Parameters:
element- the only element of the returned big list.- Returns:
- a type-specific immutable big list containing just
element.
-
synchronize
public static LongBigList synchronize(LongBigList l)
Returns a synchronized type-specific big list backed by the given type-specific big list.- Parameters:
l- the big list to be wrapped in a synchronized big list.- Returns:
- a synchronized view of the specified big list.
- See Also:
Collections.synchronizedList(List)
-
synchronize
public static LongBigList synchronize(LongBigList l, Object sync)
Returns a synchronized type-specific big list backed by the given type-specific big list, using an assigned object to synchronize.- Parameters:
l- the big list to be wrapped in a synchronized big list.sync- an object that will be used to synchronize the access to the big list.- Returns:
- a synchronized view of the specified big list.
- See Also:
Collections.synchronizedList(List)
-
unmodifiable
public static LongBigList unmodifiable(LongBigList l)
Returns an unmodifiable type-specific big list backed by the given type-specific big list.- Parameters:
l- the big list to be wrapped in an unmodifiable big list.- Returns:
- an unmodifiable view of the specified big list.
- See Also:
Collections.unmodifiableList(List)
-
asBigList
public static LongBigList asBigList(LongList list)
Returns a big list backed by the specified list.- Parameters:
list- a list.- Returns:
- a big list backed by the specified list.
-
-