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.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SortedListAsLinkedList
public SortedListAsLinkedList()
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.