it.unimi.dsi.fastutil.objects
Class ReferenceCollections.IterableCollection<K>

java.lang.Object
  extended by java.util.AbstractCollection<K>
      extended by it.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
          extended by it.unimi.dsi.fastutil.objects.ReferenceCollections.IterableCollection<K>
All Implemented Interfaces:
ObjectIterable<K>, ReferenceCollection<K>, Serializable, Iterable<K>, Collection<K>
Enclosing class:
ReferenceCollections

public static class ReferenceCollections.IterableCollection<K>
extends AbstractReferenceCollection<K>
implements Serializable

A collection wrapper class for iterables.

See Also:
Serialized Form

Field Summary
protected  ObjectIterable<K> iterable
           
static long serialVersionUID
           
 
Constructor Summary
protected ReferenceCollections.IterableCollection(ObjectIterable<K> iterable)
           
 
Method Summary
 boolean isEmpty()
           
 ObjectIterator<K> iterator()
          Returns a type-specific iterator on the elements of this collection.
 ObjectIterator<K> objectIterator()
          Deprecated. 
 int size()
           
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceCollection
add, addAll, containsAll, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.util.AbstractCollection
clear, contains, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
clear, contains, equals, hashCode, remove
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

iterable

protected final ObjectIterable<K> iterable
Constructor Detail

ReferenceCollections.IterableCollection

protected ReferenceCollections.IterableCollection(ObjectIterable<K> iterable)
Method Detail

size

public int size()
Specified by:
size in interface Collection<K>
Specified by:
size in class AbstractCollection<K>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<K>
Overrides:
isEmpty in class AbstractReferenceCollection<K>

iterator

public ObjectIterator<K> iterator()
Description copied from interface: ReferenceCollection
Returns a type-specific iterator on the elements of this collection.

Note that this specification strengthens the one given in Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extends Collection.

Specified by:
iterator in interface ObjectIterable<K>
Specified by:
iterator in interface ReferenceCollection<K>
Specified by:
iterator in interface Iterable<K>
Specified by:
iterator in interface Collection<K>
Specified by:
iterator in class AbstractReferenceCollection<K>
Returns:
a type-specific iterator on the elements of this collection.

objectIterator

@Deprecated
public ObjectIterator<K> objectIterator()
Deprecated. 

Description copied from class: AbstractReferenceCollection
Delegates to the new covariantly stronger generic method.

Specified by:
objectIterator in interface ReferenceCollection<K>
Overrides:
objectIterator in class AbstractReferenceCollection<K>
See Also:
ReferenceCollection.iterator()


Copyright © 2011. All Rights Reserved.