org.mindswap.pellet.utils.intset
Class TreeIntSet

java.lang.Object
  extended by org.mindswap.pellet.utils.intset.AbstractIntSet
      extended by org.mindswap.pellet.utils.intset.TreeIntSet
All Implemented Interfaces:
IntSet

public class TreeIntSet
extends AbstractIntSet
implements IntSet

Title:

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Constructor Summary
TreeIntSet()
           
TreeIntSet(TreeIntSet other)
           
 
Method Summary
 void add(int value)
          Adds a new integer to this set.
 void addAll(IntSet values)
          Adds all the integers from another set to this set.
 boolean contains(int value)
          Checks if the given integer value is in this set.
 IntSet copy()
          Creates a copy of this set.
 boolean isEmpty()
          Cehcks if the set is empty.
 IntIterator iterator()
          An iterator over the values of this set.
 int max()
          Returns the maximum integer in this set.
 int min()
          Returns the minimum integer in this set.
 void remove(int value)
          Remove the given integer value from this set.
 int size()
          Returns the number of elements in the set.
 
Methods inherited from class org.mindswap.pellet.utils.intset.AbstractIntSet
toString, union
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mindswap.pellet.utils.intset.IntSet
union
 

Constructor Detail

TreeIntSet

public TreeIntSet()

TreeIntSet

public TreeIntSet(TreeIntSet other)
Method Detail

add

public void add(int value)
Description copied from interface: IntSet
Adds a new integer to this set.

Specified by:
add in interface IntSet
Parameters:
value - integer value to be added

addAll

public void addAll(IntSet values)
Description copied from interface: IntSet
Adds all the integers from another set to this set.

Specified by:
addAll in interface IntSet
Overrides:
addAll in class AbstractIntSet
Parameters:
values - the set whose elements will be added

contains

public boolean contains(int value)
Description copied from interface: IntSet
Checks if the given integer value is in this set.

Specified by:
contains in interface IntSet
Parameters:
value - the integer value being checked
Returns:
true if the value is in this set

copy

public IntSet copy()
Description copied from interface: IntSet
Creates a copy of this set.

Specified by:
copy in interface IntSet
Returns:
a copy of this set

isEmpty

public boolean isEmpty()
Description copied from interface: IntSet
Cehcks if the set is empty.

Specified by:
isEmpty in interface IntSet
Returns:
true if there are no elements in the set

iterator

public IntIterator iterator()
Description copied from interface: IntSet
An iterator over the values of this set. There is no guarantee on the order of the elements.

Specified by:
iterator in interface IntSet
Returns:
an iterator over the values of the set

max

public int max()
Description copied from interface: IntSet
Returns the maximum integer in this set.

Specified by:
max in interface IntSet
Overrides:
max in class AbstractIntSet
Returns:
the maximum integer in this set

min

public int min()
Description copied from interface: IntSet
Returns the minimum integer in this set.

Specified by:
min in interface IntSet
Overrides:
min in class AbstractIntSet
Returns:
the minimum integer in this set

remove

public void remove(int value)
Description copied from interface: IntSet
Remove the given integer value from this set.

Specified by:
remove in interface IntSet
Parameters:
value - the integer value to be removed

size

public int size()
Description copied from interface: IntSet
Returns the number of elements in the set.

Specified by:
size in interface IntSet
Returns:
the number of elements in the set


Copyright © 2004 Evren Sirin. All Rights Reserved.