org.hypergraphdb.atom
Class HGAtomSet

java.lang.Object
  extended by org.hypergraphdb.atom.HGAtomSet
All Implemented Interfaces:
java.lang.Iterable<HGHandle>, java.util.Collection<HGHandle>, java.util.Set<HGHandle>, java.util.SortedSet<HGHandle>, HGSortedSet<HGHandle>
Direct Known Subclasses:
IncidenceSet

public class HGAtomSet
extends java.lang.Object
implements HGSortedSet<HGHandle>

A HGAtomSet represents a temporary construction of a set of atoms. Each atom handle is stored in the set. The implementation provides:

Author:
Borislav Iordanov

Constructor Summary
HGAtomSet()
           
HGAtomSet(HGSortedSet implementation)
           
 
Method Summary
 boolean add(HGHandle h)
           
 boolean addAll(java.util.Collection<? extends HGHandle> c)
           
 void clear()
           
 java.util.Comparator<? super HGHandle> comparator()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 boolean equals(java.lang.Object x)
           
 HGHandle first()
           
 HGRandomAccessResult<HGHandle> getSearchResult()
           
 int hashCode()
           
 java.util.SortedSet<HGHandle> headSet(HGHandle h)
           
 boolean isEmpty()
           
 java.util.Iterator<HGHandle> iterator()
           
 HGHandle last()
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 int size()
           
 java.util.SortedSet<HGHandle> subSet(HGHandle fromElement, HGHandle toElement)
           
 java.util.SortedSet<HGHandle> tailSet(HGHandle h)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HGAtomSet

public HGAtomSet()

HGAtomSet

public HGAtomSet(HGSortedSet implementation)
Method Detail

getSearchResult

public HGRandomAccessResult<HGHandle> getSearchResult()
Specified by:
getSearchResult in interface HGSortedSet<HGHandle>

comparator

public java.util.Comparator<? super HGHandle> comparator()
Specified by:
comparator in interface java.util.SortedSet<HGHandle>

first

public HGHandle first()
Specified by:
first in interface java.util.SortedSet<HGHandle>

headSet

public java.util.SortedSet<HGHandle> headSet(HGHandle h)
Specified by:
headSet in interface java.util.SortedSet<HGHandle>

last

public HGHandle last()
Specified by:
last in interface java.util.SortedSet<HGHandle>

subSet

public java.util.SortedSet<HGHandle> subSet(HGHandle fromElement,
                                            HGHandle toElement)
Specified by:
subSet in interface java.util.SortedSet<HGHandle>

tailSet

public java.util.SortedSet<HGHandle> tailSet(HGHandle h)
Specified by:
tailSet in interface java.util.SortedSet<HGHandle>

add

public boolean add(HGHandle h)
Specified by:
add in interface java.util.Collection<HGHandle>
Specified by:
add in interface java.util.Set<HGHandle>

addAll

public boolean addAll(java.util.Collection<? extends HGHandle> c)
Specified by:
addAll in interface java.util.Collection<HGHandle>
Specified by:
addAll in interface java.util.Set<HGHandle>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<HGHandle>
Specified by:
clear in interface java.util.Set<HGHandle>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<HGHandle>
Specified by:
contains in interface java.util.Set<HGHandle>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<HGHandle>
Specified by:
containsAll in interface java.util.Set<HGHandle>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<HGHandle>
Specified by:
isEmpty in interface java.util.Set<HGHandle>

iterator

public java.util.Iterator<HGHandle> iterator()
Specified by:
iterator in interface java.lang.Iterable<HGHandle>
Specified by:
iterator in interface java.util.Collection<HGHandle>
Specified by:
iterator in interface java.util.Set<HGHandle>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<HGHandle>
Specified by:
remove in interface java.util.Set<HGHandle>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<HGHandle>
Specified by:
removeAll in interface java.util.Set<HGHandle>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<HGHandle>
Specified by:
retainAll in interface java.util.Set<HGHandle>

size

public int size()
Specified by:
size in interface java.util.Collection<HGHandle>
Specified by:
size in interface java.util.Set<HGHandle>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<HGHandle>
Specified by:
toArray in interface java.util.Set<HGHandle>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<HGHandle>
Specified by:
toArray in interface java.util.Set<HGHandle>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<HGHandle>
Specified by:
hashCode in interface java.util.Set<HGHandle>
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object x)
Specified by:
equals in interface java.util.Collection<HGHandle>
Specified by:
equals in interface java.util.Set<HGHandle>
Overrides:
equals in class java.lang.Object