|
OpMath | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.opmath.util.datastruct.ComparableArray
|
+--com.opmath.util.datastruct.ComparableArrayRO
An object which can serve as a ComparableTable column, implemented using a
Comparable[].
ComparableArrayRO implements the ComparableList interface, thus it provides
a storage structure for columns of a ComparableTable with exactly the access methods
required by the containing class.
ComparableArrayRO is used to store data that will not change after
the column has been created. There are two motivations for this class:
ComparableArrayRO expresses
this arrangement. It provides the benefit to the programmer of not having to re-create such
structures each time a containing ComparableTable is cleared.
ComparableArrayRO is the most efficient implementation of the
ComparableList interface, because it works with fixed-size storage.
Copyright: (c) 2002 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
| Field Summary |
| Fields inherited from class com.opmath.util.datastruct.ComparableArray |
a |
| Constructor Summary | |
ComparableArrayRO(Comparable[] src)
Constructs a ComparableArrayRO. |
|
| Method Summary | |
void |
clear()
Does nothing. |
Comparable |
set(int index,
Comparable element)
Always thows an UnsupportedOperationException. |
| Methods inherited from class com.opmath.util.datastruct.ComparableArray |
add, elements, get, indexOf, size, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.opmath.util.datastruct.ComparableList |
add, elements, get, indexOf, size, toString |
| Constructor Detail |
public ComparableArrayRO(Comparable[] src)
ComparableArrayRO. The data for the new instance is a
System.arraycopy(..) of the given Compararble[].
src - a Compararble[] used to populate the ComparableArrayRO.| Method Detail |
public void clear()
clear in interface ComparableListclear in class ComparableArray
public Comparable set(int index,
Comparable element)
throws UnsupportedOperationException
UnsupportedOperationException.
NOTE: Although it is declared as returning a Comparable, set(int, Comparable)
never returns anything.
set in interface ComparableListset in class ComparableArrayindex - the int index of element to replace.element - the Comparable element to be stored at the specified position.
UnsupportedOperationException - always.
|
OpMath | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||