public class ShortCollections extends Object
Collections
Modifier and Type | Class and Description |
---|---|
static class |
ShortCollections.EmptyCollection
An immutable class representing an empty type-specific collection.
|
static class |
ShortCollections.IterableCollection
A collection wrapper class for iterables.
|
static class |
ShortCollections.SynchronizedCollection
A synchronized wrapper class for collections.
|
static class |
ShortCollections.UnmodifiableCollection
An unmodifiable wrapper class for collections.
|
Modifier and Type | Method and Description |
---|---|
static ShortCollection |
asCollection(ShortIterable iterable)
Returns an unmodifiable collection backed by the specified iterable.
|
static ShortCollection |
synchronize(ShortCollection c)
Returns a synchronized collection backed by the specified collection.
|
static ShortCollection |
synchronize(ShortCollection c,
Object sync)
Returns a synchronized collection backed by the specified collection, using an assigned object to synchronize.
|
static ShortCollection |
unmodifiable(ShortCollection c)
Returns an unmodifiable collection backed by the specified collection.
|
public static ShortCollection synchronize(ShortCollection c)
c
- the collection to be wrapped in a synchronized collection.Collections.synchronizedCollection(Collection)
public static ShortCollection synchronize(ShortCollection c, Object sync)
c
- the collection to be wrapped in a synchronized collection.sync
- an object that will be used to synchronize the list access.Collections.synchronizedCollection(Collection)
public static ShortCollection unmodifiable(ShortCollection c)
c
- the collection to be wrapped in an unmodifiable collection.Collections.unmodifiableCollection(Collection)
public static ShortCollection asCollection(ShortIterable iterable)
iterable
- the iterable object to be wrapped in an unmodifiable collection.