All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.micronova.util.SortedVector

java.lang.Object
   |
   +----netscape.util.Vector
           |
           +----com.micronova.util.SortedVector

public class SortedVector
extends Vector
A SortedVector keeps its Comparable elements sorted in ascending order.

Version:
1.01
Author:
Makoto Nagata, MicroNova
See Also:
Comparable

Constructor Index

 o SortedVector()

Method Index

 o addComparable(Comparable)
Adds a Comparable sorted in ascending order.
 o getSegmentIndex(Comparable)
Returns the segment index to which a given Comparable p belongs.

Constructors

 o SortedVector
 public SortedVector()

Methods

 o addComparable
 public void addComparable(Comparable p)
Adds a Comparable sorted in ascending order. If there already exists a Comparable q such that q.equals(p), then q is replaced with p.

 o getSegmentIndex
 public int getSegmentIndex(Comparable p)
Returns the segment index to which a given Comparable p belongs.
For an ordered sequence of N Comparables q[0] < q[1] < ... < q[N-1],
the seqment index for a Comparable p is defined as follows:


All Packages  Class Hierarchy  This Package  Previous  Next  Index