Opus5
Class SortedListAsLinkedList

java.lang.Object
  |
  +--Opus5.AbstractObject
        |
        +--Opus5.AbstractContainer
              |
              +--Opus5.AbstractSearchableContainer
                    |
                    +--Opus5.OrderedListAsLinkedList
                          |
                          +--Opus5.SortedListAsLinkedList
All Implemented Interfaces:
Comparable, Container, OrderedList, SearchableContainer, SortedList

public class SortedListAsLinkedList
extends OrderedListAsLinkedList
implements SortedList

A sorted list implemented using an array.

Version:
$Id: SortedListAsLinkedList.java,v 3.5 1998/07/29 14:50:08 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Inner classes inherited from class Opus5.OrderedListAsLinkedList
OrderedListAsLinkedList.MyCursor
 
Fields inherited from class Opus5.OrderedListAsLinkedList
linkedList
 
Fields inherited from class Opus5.AbstractContainer
count
 
Fields inherited from interface Opus5.SortedList
copyright
 
Fields inherited from interface Opus5.OrderedList
copyright
 
Constructor Summary
SortedListAsLinkedList()
           
 
Method Summary
protected  LinkedList.Element findElement(Comparable arg)
          Finds the linked list element in this sorted list of a comparable object that matches the specified comparable object.
 Cursor findPosition(Comparable object)
          Returns the position of an object in this sorted list that matches the specified object.
 void insert(Comparable arg)
          Inserts the specified object into this sorted list.
 
Methods inherited from class Opus5.OrderedListAsLinkedList
accept, compareTo, find, get, getEnumeration, isMember, purge, withdraw
 
Methods inherited from class Opus5.AbstractContainer
getCount, hashCode, isEmpty, isFull, toString
 
Methods inherited from class Opus5.AbstractObject
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Opus5.SortedList
get
 
Methods inherited from interface Opus5.SearchableContainer
find, isMember, withdraw
 
Methods inherited from interface Opus5.Container
accept, getCount, getEnumeration, isEmpty, isFull, purge
 
Methods inherited from interface Opus5.Comparable
compare, isEQ, isGE, isGT, isLE, isLT, isNE
 

Constructor Detail

SortedListAsLinkedList

public SortedListAsLinkedList()
Method Detail

insert

public void insert(Comparable arg)
Inserts the specified object into this sorted list.
Specified by:
insert in interface SearchableContainer
Overrides:
insert in class OrderedListAsLinkedList
Parameters:
object - The object to insert.
Throws:
ContainerFullException - If this sorted list is full.

findElement

protected LinkedList.Element findElement(Comparable arg)
Finds the linked list element in this sorted list of a comparable object that matches the specified comparable object.
Parameters:
object - The object to match.
Returns:
The list element that contains the matching object; null if no match is found.

findPosition

public Cursor findPosition(Comparable object)
Returns the position of an object in this sorted list that matches the specified object.
Specified by:
findPosition in interface SortedList
Overrides:
findPosition in class OrderedListAsLinkedList
Parameters:
object - The object to match.
Returns:
The position in this list of the matching object.