it.unimi.dsi.fastutil.objects
Class ReferenceCollections.SynchronizedCollection
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceCollections.SynchronizedCollection
- All Implemented Interfaces:
- Collection, ReferenceCollection, Serializable
- Direct Known Subclasses:
- ReferenceLists.SynchronizedList, ReferenceSets.SynchronizedSet
- Enclosing class:
- ReferenceCollections
- public static class ReferenceCollections.SynchronizedCollection
- extends Object
- implements ReferenceCollection, Serializable
A synchronized wrapper class for collections.
- See Also:
- Serialized Form
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
size
public int size()
- Specified by:
size
in interface Collection
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interface Collection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Collection
objectIterator
public ObjectIterator objectIterator()
- Description copied from interface:
ReferenceCollection
- Returns a type-specific iterator on the collection.
The iterator returned by the Collection.iterator()
method and by this
method are identical; however, using this method you can save a type casting.
- Specified by:
objectIterator
in interface ReferenceCollection
- See Also:
Collection.iterator()
add
public boolean add(Object k)
- Specified by:
add
in interface Collection
rem
public boolean rem(Object k)
remove
public boolean remove(Object ok)
- Specified by:
remove
in interface Collection
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interface Collection
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll
in interface Collection
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll
in interface Collection
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll
in interface Collection
containsAll
public boolean containsAll(ReferenceCollection c)
addAll
public boolean addAll(ReferenceCollection c)
removeAll
public boolean removeAll(ReferenceCollection c)
retainAll
public boolean retainAll(ReferenceCollection c)
clear
public void clear()
- Specified by:
clear
in interface Collection
toString
public String toString()