de.aitools.aq.structure
Class IteratorSet<I>
java.lang.Object
de.aitools.aq.structure.IteratorSet<I>
- All Implemented Interfaces:
- java.lang.Iterable<I>, java.util.Collection<I>, java.util.Set<I>
public abstract class IteratorSet<I>
- extends java.lang.Object
- implements java.util.Set<I>
Can be extended for implementations of a set based on the elements returned
by a iterator.
Only the methods Set.iterator()
, Set.add(Object)
and
Set.size()
need to be implemented.
- Version:
- $Id: IteratorSet.java,v 1.2 2012/04/19 10:01:06 dogu3912 Exp $
- Author:
- johannes.kiesel(/\t)uni-weimar.de
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
add, iterator, size |
addAll
public boolean addAll(java.util.Collection<? extends I> c)
throws java.lang.NullPointerException
- Specified by:
addAll
in interface java.util.Collection<I>
- Specified by:
addAll
in interface java.util.Set<I>
- Throws:
java.lang.NullPointerException
clear
public void clear()
- Specified by:
clear
in interface java.util.Collection<I>
- Specified by:
clear
in interface java.util.Set<I>
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interface java.util.Collection<I>
- Specified by:
contains
in interface java.util.Set<I>
containsAll
public boolean containsAll(java.util.Collection<?> c)
throws java.lang.NullPointerException
- Specified by:
containsAll
in interface java.util.Collection<I>
- Specified by:
containsAll
in interface java.util.Set<I>
- Throws:
java.lang.NullPointerException
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Collection<I>
- Specified by:
isEmpty
in interface java.util.Set<I>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interface java.util.Collection<I>
- Specified by:
remove
in interface java.util.Set<I>
removeAll
public boolean removeAll(java.util.Collection<?> c)
throws java.lang.NullPointerException
- Specified by:
removeAll
in interface java.util.Collection<I>
- Specified by:
removeAll
in interface java.util.Set<I>
- Throws:
java.lang.NullPointerException
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interface java.util.Collection<I>
- Specified by:
retainAll
in interface java.util.Set<I>
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interface java.util.Collection<I>
- Specified by:
toArray
in interface java.util.Set<I>
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interface java.util.Collection<I>
- Specified by:
toArray
in interface java.util.Set<I>
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Collection<I>
- Specified by:
equals
in interface java.util.Set<I>
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Collection<I>
- Specified by:
hashCode
in interface java.util.Set<I>
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object