Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.emory.mathcs.util.collections.longs
Class AbstractLongSortedSet.AbstractSubView

    java.lang.Object
      edu.emory.mathcs.util.collections.longs.AbstractLongCollection
          edu.emory.mathcs.util.collections.longs.AbstractLongSet
              edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet
                  edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet.AbstractSubView

All Implemented Interfaces:
  LongCollection, LongSet, LongSortedSet, java.io.Serializable

Enclosing class:
  AbstractLongSortedSet

protected abstract static class AbstractLongSortedSet.AbstractSubView
extends AbstractLongSortedSet
implements java.io.Serializable

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet
`AbstractLongSortedSet.AbstractComplementSubView, AbstractLongSortedSet.AbstractSubView, AbstractLongSortedSet.ForwardIntervalItemIterator, AbstractLongSortedSet.ReverseIntervalItemIterator`

Field Summary
`protected LongSortedSet` | `base`
`protected long` | `beg`
`protected long` | `end`

Constructor Summary
`protected` | `AbstractLongSortedSet.AbstractSubView(LongSortedSet base, long beg, long end)`

Method Summary
`boolean` | `add(long e)` Adds the specified number to this set if it is not already present and if it falls within the domain.
`boolean` | `addInterval(long first, long last)` Adds to this set all the numbers between first and last, inclusive, that are not already present in this set and belong to this set's domain.
`LongInterval` | `ceilingInterval(long e)` Returns the smallest (left-most), widest interval contained in this set which elements are not all smaller than the specified number.
`void` | `clear()` Removes all of the elements from this set.
`boolean` | `contains(long e)` Returns true if this set contains the specified number; false otherwise.
`boolean` | `containsInterval(long first, long last)` Returns true if this set contains all the numbers between first and last, inclusive; false otherwise.
`abstract java.util.Iterator` | `descendingIntervalIterator()` Returns an iterator over intervals of this set, in a decreasing numerical order.
`LongInterval` | `enclosingInterval(long e)` Returns the widest interval contained in this set that includes the specified number, or null if this set does not include the specified number.
`LongInterval` | `floorInterval(long e)` Returns the largest (right-most), widest interval contained in this set which elements are not all greater than the specified number.
`LongInterval` | `higherInterval(long e)` Returns the smallest (left-most), widest interval contained in this set which all elements are strictly greater than the specified number.
`int` | `intervalCount()` Returns the minimum count of intervals into which this set can be decomposed.
`abstract java.util.Iterator` | `intervalIterator()` Returns an iterator over intervals of this set, in an increasing numerical order.
`LongInterval` | `lowerInterval(long e)` Returns the largest and widest interval contained in this set which all elements are strictly less than the specified number.
`long` | `max()` The largest number that can be stored in this set.
`long` | `min()` The smallest number that can be stored in this set.
`boolean` | `remove(long e)` Removes the specified number from this set if it is present.
`boolean` | `removeInterval(long first, long last)` Removes from this set all the numbers between first and last, inclusive.
`long` | `size64()` // PREPROC: Long,Int only Returns the number of elements in this set.
`abstract LongSortedSet` | `subSet(long first, long last)` A subset view containing all elements from this set between first, inclusive, and last, inclusive.

Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSortedSet
`ceiling, descendingIterator, first, firstInterval, floor, headSet, higher, isEmpty, iterator, last, lastInterval, lower, pollFirst, pollFirstInterval, pollLast, pollLastInterval, retainAll, retainInterval, tailSet, toCompactString`

Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSet
`addAll, complementSet, equals, hashCode, removeAll`

Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongCollection
`containsAll, size, toArray, toArray, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongSortedSet
`toString`

Methods inherited from interface edu.emory.mathcs.util.collections.longs.LongSet
`addAll, complementSet, containsAll, equals, hashCode, removeAll, size, toArray, toArray`

Field Detail

### base

    protected final LongSortedSet base

### beg

    protected final long beg

### end

    protected final long end

Constructor Detail

### AbstractLongSortedSet.AbstractSubView

    protected AbstractLongSortedSet.AbstractSubView(LongSortedSet base,
                                                    long beg,
                                                    long end)

Method Detail

### min

    public long min()

  Description copied from interface: `LongSet`
  The smallest number that can be stored in this set.

  Specified by:
    `min` in interface `LongSet`
  Overrides:
    `min` in class `AbstractLongSet`

### max

    public long max()

  Description copied from interface: `LongSet`
  The largest number that can be stored in this set.

  Specified by:
    `max` in interface `LongSet`
  Overrides:
    `max` in class `AbstractLongSet`

### size64

    public long size64()

  Description copied from interface: `LongSet`
  // PREPROC: Long,Int only Returns the number of elements in this set. // PREPROC: Long,Int only

  Specified by:
    `size64` in interface `LongSet`
  Overrides:
    `size64` in class `AbstractLongSortedSet`

### intervalCount

    public int intervalCount()

  Description copied from interface: `LongSortedSet`
  Returns the minimum count of intervals into which this set can be decomposed. For instance, {1, 3,4,5, 8,9}.intervalCount() == 3.

  Specified by:
    `intervalCount` in interface `LongSortedSet`
  Overrides:
    `intervalCount` in class `AbstractLongSortedSet`

### clear

    public void clear()

  Description copied from interface: `LongSet`
  Removes all of the elements from this set. The set will be empty after this call returns.

  Specified by:
    `clear` in interface `LongSet`
  Overrides:
    `clear` in class `AbstractLongCollection`

### add

    public boolean add(long e)

  Description copied from interface: `LongSet`
  Adds the specified number to this set if it is not already present and if it falls within the domain.

  Specified by:
    `add` in interface `LongSet`
  Overrides:
    `add` in class `AbstractLongCollection`

### addInterval

    public boolean addInterval(long first,
                               long last)

  Description copied from interface: `LongSet`
  Adds to this set all the numbers between first and last, inclusive, that are not already present in this set and belong to this set's domain.

  Specified by:
    `addInterval` in interface `LongSet`
  Overrides:
    `addInterval` in class `AbstractLongSet`

### remove

    public boolean remove(long e)

  Description copied from interface: `LongSet`
  Removes the specified number from this set if it is present.

  Specified by:
    `remove` in interface `LongSet`
  Overrides:
    `remove` in class `AbstractLongCollection`

### removeInterval

    public boolean removeInterval(long first,
                                  long last)

  Description copied from interface: `LongSet`
  Removes from this set all the numbers between first and last, inclusive.

  Specified by:
    `removeInterval` in interface `LongSet`
  Overrides:
    `removeInterval` in class `AbstractLongSet`

### contains

    public boolean contains(long e)

  Description copied from interface: `LongSet`
  Returns true if this set contains the specified number; false otherwise.

  Specified by:
    `contains` in interface `LongSet`
  Overrides:
    `contains` in class `AbstractLongCollection`

### containsInterval

    public boolean containsInterval(long first,
                                    long last)

  Description copied from interface: `LongSet`
  Returns true if this set contains all the numbers between first and last, inclusive; false otherwise.

  Specified by:
    `containsInterval` in interface `LongSet`
  Overrides:
    `containsInterval` in class `AbstractLongSet`

### enclosingInterval

    public LongInterval enclosingInterval(long e)

  Description copied from interface: `LongSortedSet`
  Returns the widest interval contained in this set that includes the specified number, or null if this set does not include the specified number.

  Specified by:
    `enclosingInterval` in interface `LongSortedSet`
  Returns:
    the interval containing the specified number.

### higherInterval

    public LongInterval higherInterval(long e)

  Description copied from interface: `LongSortedSet`
  Returns the smallest (left-most), widest interval contained in this set which all elements are strictly greater than the specified number.

  Specified by:
    `higherInterval` in interface `LongSortedSet`
  Returns:
    the smallest interval greater than the specified number.

### ceilingInterval

    public LongInterval ceilingInterval(long e)

  Description copied from interface: `LongSortedSet`
  Returns the smallest (left-most), widest interval contained in this set which elements are not all smaller than the specified number. In other words, it either includes the specified number or has all elements strictly greater than the specified number.

  Specified by:
    `ceilingInterval` in interface `LongSortedSet`
  Returns:
    the smallest interval which upper bound is >= than the specified number.

### lowerInterval

    public LongInterval lowerInterval(long e)

  Description copied from interface: `LongSortedSet`
  Returns the largest and widest interval contained in this set which all elements are strictly less than the specified number.

  Specified by:
    `lowerInterval` in interface `LongSortedSet`
  Returns:
    the largest interval smaller than the specified number.

### floorInterval

    public LongInterval floorInterval(long e)

  Description copied from interface: `LongSortedSet`
  Returns the largest (right-most), widest interval contained in this set which elements are not all greater than the specified number. In other words, it either includes the specified number or has all elements strictly less than the specified number.

  Specified by:
    `floorInterval` in interface `LongSortedSet`
  Returns:
    the largest interval which lower bound is <= than the specified number.

### subSet

    public abstract LongSortedSet subSet(long first,
                                         long last)

  Description copied from interface: `LongSortedSet`
  A subset view containing all elements from this set between first, inclusive, and last, inclusive. More precisely, the view is narrowed to the domain [min, max]. Hence, complement set of this set will NOT include any elements outside [min, max].

  Specified by:
    `subSet` in interface `LongSortedSet`
  Parameters:
    `first` - the minimum element of this view (inclusive).
    `last` - the maximum element of this view (inclusive).
  Returns:
    the subset view

### intervalIterator

    public abstract java.util.Iterator intervalIterator()

  Description copied from interface: `LongSortedSet`
  Returns an iterator over intervals of this set, in an increasing numerical order.

  Specified by:
    `intervalIterator` in interface `LongSortedSet`
  Returns:
    an iterator over intervals of this set

### descendingIntervalIterator

    public abstract java.util.Iterator descendingIntervalIterator()

  Description copied from interface: `LongSortedSet`
  Returns an iterator over intervals of this set, in a decreasing numerical order.

  Specified by:
    `descendingIntervalIterator` in interface `LongSortedSet`
  Returns:
    a descending iterator over intervals of this set

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD