org.compass.core.util.asm.tree.analysis
Class SmallSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet
          extended by org.compass.core.util.asm.tree.analysis.SmallSet
All Implemented Interfaces:
Iterable, Collection, Iterator, Set

 class SmallSet
extends AbstractSet
implements Iterator

A set of at most two elements.

Author:
Eric Bruneton

Field Summary
(package private)  Object e1
           
(package private)  Object e2
           
(package private) static Set EMPTY_SET
           
 
Constructor Summary
SmallSet(Object e1, Object e2)
           
 
Method Summary
 boolean hasNext()
           
 Iterator iterator()
           
 Object next()
           
 void remove()
           
 int size()
           
(package private)  Set union(SmallSet s)
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Field Detail

e1

Object e1

e2

Object e2

EMPTY_SET

static final Set EMPTY_SET
Constructor Detail

SmallSet

SmallSet(Object e1,
         Object e2)
Method Detail

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface Set
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface Set
Specified by:
size in class AbstractCollection

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

union

Set union(SmallSet s)


Copyright (c) 2004-2008 The Compass Project.