FileDocCategorySizeDatePackage
BTreeSet.javaAPI DocApache Poi 3.0.127676Mon Jan 01 18:55:24 GMT 2007org.apache.poi.hdf.extractor.util

BTreeSet

public class BTreeSet extends AbstractSet implements Set

Fields Summary
public BTreeNode
root
private Comparator
comparator
private int
order
private int
size
Constructors Summary
public BTreeSet()


    /*
     *                             Constructors
     * A no-arg constructor is supported in accordance with the specifications of the
     * java.util.Collections interface.  If the order for the B-Tree is not specified
     * at construction it defaults to 32.
    */

      
        this(6);           // Default order for a BTreeSet is 32
    
public BTreeSet(Collection c)

        this(6);           // Default order for a BTreeSet is 32
        addAll(c);
    
public BTreeSet(int order)

        this(order, null);
    
public BTreeSet(int order, Comparator comparator)

        this.order = order;
        this.comparator = comparator;
        root = new BTreeNode(null);
    
Methods Summary
public booleanadd(java.lang.Object x)

        if (x == null) throw new IllegalArgumentException();
        return root.insert(x, -1);
    
public voidclear()

        root = new BTreeNode(null);
        size = 0;
    
private intcompare(java.lang.Object x, java.lang.Object y)

        return (comparator == null ? ((Comparable)x).compareTo(y) : comparator.compare(x, y));
    
public booleancontains(java.lang.Object x)

        return root.includes(x);
    
public java.util.Iteratoriterator()

        return new Iterator();
    
public booleanremove(java.lang.Object x)

        if (x == null) return false;
        return root.delete(x, -1);
    
public intsize()

        return size;