org.terracotta.offheapstore.util
Class AATreeSet<T extends Comparable<? super T>>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<T>
          extended by org.terracotta.offheapstore.util.AATreeSet<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, Set<T>, SortedSet<T>
Direct Known Subclasses:
AATreeFileAllocator, PowerOfTwoAllocator

public class AATreeSet<T extends Comparable<? super T>>
extends AbstractSet<T>
implements SortedSet<T>


Nested Class Summary
static class AATreeSet.AbstractTreeNode<E extends Comparable<? super E>>
           
static interface AATreeSet.Node<E extends Comparable<? super E>>
           
 
Constructor Summary
AATreeSet()
           
 
Method Summary
 boolean add(T o)
           
 void clear()
           
 Comparator<? super T> comparator()
           
 T find(Object probe)
           
 T first()
           
protected  AATreeSet.Node<T> getRoot()
           
 SortedSet<T> headSet(T toElement)
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 T last()
           
 boolean remove(Object o)
           
 T removeAndReturn(Object o)
           
 int size()
           
 SortedSet<T> subSet(T fromElement, T toElement)
           
 SortedSet<T> tailSet(T fromElement)
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, 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
addAll, contains, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

AATreeSet

public AATreeSet()
Method Detail

add

public boolean add(T o)
Specified by:
add in interface Collection<T extends Comparable<? super T>>
Specified by:
add in interface Set<T extends Comparable<? super T>>
Overrides:
add in class AbstractCollection<T extends Comparable<? super T>>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<T extends Comparable<? super T>>
Specified by:
remove in interface Set<T extends Comparable<? super T>>
Overrides:
remove in class AbstractCollection<T extends Comparable<? super T>>

removeAndReturn

public T removeAndReturn(Object o)

clear

public void clear()
Specified by:
clear in interface Collection<T extends Comparable<? super T>>
Specified by:
clear in interface Set<T extends Comparable<? super T>>
Overrides:
clear in class AbstractCollection<T extends Comparable<? super T>>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T extends Comparable<? super T>>
Specified by:
iterator in interface Collection<T extends Comparable<? super T>>
Specified by:
iterator in interface Set<T extends Comparable<? super T>>
Specified by:
iterator in class AbstractCollection<T extends Comparable<? super T>>

size

public int size()
Specified by:
size in interface Collection<T extends Comparable<? super T>>
Specified by:
size in interface Set<T extends Comparable<? super T>>
Specified by:
size in class AbstractCollection<T extends Comparable<? super T>>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T extends Comparable<? super T>>
Specified by:
isEmpty in interface Set<T extends Comparable<? super T>>
Overrides:
isEmpty in class AbstractCollection<T extends Comparable<? super T>>

comparator

public Comparator<? super T> comparator()
Specified by:
comparator in interface SortedSet<T extends Comparable<? super T>>

subSet

public SortedSet<T> subSet(T fromElement,
                           T toElement)
Specified by:
subSet in interface SortedSet<T extends Comparable<? super T>>

headSet

public SortedSet<T> headSet(T toElement)
Specified by:
headSet in interface SortedSet<T extends Comparable<? super T>>

tailSet

public SortedSet<T> tailSet(T fromElement)
Specified by:
tailSet in interface SortedSet<T extends Comparable<? super T>>

first

public T first()
Specified by:
first in interface SortedSet<T extends Comparable<? super T>>

last

public T last()
Specified by:
last in interface SortedSet<T extends Comparable<? super T>>

find

public T find(Object probe)

getRoot

protected final AATreeSet.Node<T> getRoot()


Copyright © 2015. All Rights Reserved.