Package org.aksw.commons.collections
Class CollectionFromIterable<T>
java.lang.Object
java.util.AbstractCollection<T>
org.aksw.commons.collections.CollectionFromIterable<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<T>,Collection<T>
Collection view of an underlying iterable.
If the provided iterable is a collection, .size() will delegate to it
- Author:
- raven
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
iterable
-
-
Constructor Details
-
CollectionFromIterable
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin classAbstractCollection<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein classAbstractCollection<T>
-
toString
- Overrides:
toStringin classAbstractCollection<T>
-
wrap
-
create
-