All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.models
Interface RangeCollectionInterface

All Superinterfaces:
  java.lang.Cloneable, com.sas.collection.ContentsChangedSource, com.sas.PublicClonable

All Known Implementing Classes:
  RangeCollection

    public interface RangeCollectionInterface

extends com.sas.collection.ContentsChangedSource, com.sas.PublicClonable

See Also:
  `RangeCollection`, `RangeSegment`, `RangeSegmentInterface`

Method Summary
`abstract void` | `addSegment(RangeSegmentInterface segment)` Add a segment into the rangeCollection.
`abstract java.lang.Object` | `clone()` Clone an object.
`abstract java.awt.Color` | `getColor(double value)` Return the color that represents the given value within the rangeCollection.
`abstract RangeSegmentInterface` | `getSegment(double value)` Fetch the segment at the specified index in the rangeCollection.
`abstract RangeSegmentInterface` | `getSegment(int index)` Fetch the segment containing the specified value in the rangeCollection.
`abstract int` | `getSegmentCount()` Return the number of segments in the rangeCollection.
`abstract void` | `removeAllSegments()` Removes all the segments from the rangeCollection.
`abstract void` | `removeSegment(int index)` Remove a segment from the rangeCollection.
`abstract void` | `removeSegment(RangeSegmentInterface segment)` Remove a segment from the rangeCollection.

Methods inherited from interface com.sas.collection.ContentsChangedSource
`addContentsChangedListener, removeContentsChangedListener`

Method Detail

### getSegmentCount

    int getSegmentCount()

  Return the number of segments in the rangeCollection.

  Returns:
    int The number of segments in the rangeCollection.

### getSegment

    RangeSegmentInterface getSegment(double value)

  Fetch the segment at the specified index in the rangeCollection.

  Parameters:
    `index` - The position of the segment in the rangeCollection. Indices are zero-based.

### getSegment

    RangeSegmentInterface getSegment(int index)

  Fetch the segment containing the specified value in the rangeCollection. This method handles underflow and overflow the same as getColor.

  Parameters:
    `value` - The value in the rangeCollection to determine the segment.

### addSegment

    void addSegment(RangeSegmentInterface segment)

  Add a segment into the rangeCollection. A segment can only be added at the begining or the end of the rangeCollection. The position of the segment in the range is determined by its min and max values.

  Parameters:
    `segment` - The segment to add to the rangeCollection. It must implement the RangeSegment Interface.

### removeSegment

    void removeSegment(RangeSegmentInterface segment)

  Remove a segment from the rangeCollection. A segment can only be removed from the beginning or the end of the rangeCollection.

  Parameters:
    `segment` - The segment to remove from the rangeCollection.

### removeSegment

    void removeSegment(int index)

  Remove a segment from the rangeCollection. A segment can only be removed from the beginning or the end of the rangeCollection.

  Parameters:
    `index` - The index of the segment to remove from the rangeCollection. The index must be 0 or getSegmentCount()-1.

### removeAllSegments

    void removeAllSegments()

  Removes all the segments from the rangeCollection.

### getColor

    java.awt.Color getColor(double value)

  Return the color that represents the given value within the rangeCollection. If the value passed in is contained in two segments, the lower segment color is returned. If the value passed in is below the mininum value of the rangeCollection, the first segment color is returned. If the value passed in is above the maximum value of the rangeCollection, the last segment color is returned.

  Parameters:
    `value` - The value whose color is desired.
  Returns:
    Color The color representing the specified value.

### clone

    java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Clone an object.

  Specified by:
    `clone` in interface `com.sas.PublicClonable`
  Returns:
    a clone of the object.
  Throws:
    `java.lang.CloneNotSupportedException` - if the clone fails.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.