public class Taxonomy extends ArrayList implements Contextable
| Constructor and Description |
|---|
Taxonomy()
Construct a taxonomy.
|
Taxonomy(Context context)
Construct a taxonomy with the specified Context.
|
Taxonomy(int initialCapacity)
Construct a taxonomy of the specified initial capaciity.
|
Taxonomy(int initialCapacity,
Context context)
Construct a taxonomy of the specified initial capaciity and the specified Context.
|
| Modifier and Type | Method and Description |
|---|---|
BitCode |
computeAncestors(Sort sort)
Returns the set of ancestors of the specified sort as a BitCode.
|
BitCode |
computeDescendants(Sort sort)
Returns the set of descendants of the specified sort as a BitCode.
|
int |
computeHeight(Sort sort)
Returns the height of the specified sort in its taxonomy.
|
Context |
context()
Returns this taxonomy's sort ordering context.
|
void |
encodeSorts()
Encodes all the sorts of this taxonomy.
|
void |
encodeSorts(int first,
int last)
Encodes the sorts between index first and index last (both
inclusive) of this sort code array, reorders it so that a sort is
always below its upper sorts, and check for cycles, committing
all defined sorts in the specified range.
|
Sort |
getSort(int index)
This returns the sort with specified index in this taxonomy.
|
static boolean |
isLocked()
Returns true iff the current sort taxonomy has been been encoded.
|
BitCode |
maxLowerBounds(BitCode code)
This returns a bit code representing the set of sorts whose codes
are the maximal lower bounds of the specified bit code as
explained in the specification.
|
BitCode |
maxLowerBounds(BitCode code,
BitCode mlbs) |
BitCode |
minUpperBounds(BitCode code)
This returns a bit code representing the set of sorts whose codes
are the minimal upper bounds of the specified bit code as
explained in the specification.
|
BitCode |
minUpperBounds(BitCode code,
BitCode mubs) |
void |
reset(int minIndex) |
Taxonomy |
setContext(Context context)
Set this taxonomy's sort ordering context to the specified one.
|
void |
showSortCodes()
This displays all the defined sorts in this taxonomy using
the specified display manager.
|
void |
showSortCodes(int first,
int last)
This displays the elements of this taxonomy between index
first and index last (both inclusive) using the specified display
manager.
|
void |
unlock()
Unlocks this taxonomy.
|
add, add, addAll, addAll, addAll, addAll, addElement, capacity, clear, clear, clone, contains, containsAll, containsAll, copyInto, elementAt, ensureCapacity, equals, firstElement, get, hasGaps, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAll, removeAllElements, removeAllFirst, removeAllFirst, removeElement, removeElementAt, removeGaps, removeRange, retainAll, set, setElementAt, setIncrementFactor, setLast, setSize, size, toArray, toString, toStringArray, trimToSizeaddAll, containsAll, removeAll, retainAll, toArraypublic Taxonomy()
public Taxonomy(int initialCapacity)
public Taxonomy(Context context)
public Taxonomy(int initialCapacity,
Context context)
public Context context()
context in interface Contextablepublic Taxonomy setContext(Context context)
setContext in interface Contextablepublic Sort getSort(int index)
public static boolean isLocked()
public void unlock()
public void encodeSorts()
throws AnomalousSituationException
AnomalousSituationExceptionpublic void encodeSorts(int first,
int last)
throws AnomalousSituationException,
LockedCodeArrayException,
CyclicSortOrderingException
public void reset(int minIndex)
public BitCode maxLowerBounds(BitCode code) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic BitCode maxLowerBounds(BitCode code, BitCode mlbs) throws LockedCodeArrayException, LockedBitCodeException
public BitCode minUpperBounds(BitCode code) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic BitCode minUpperBounds(BitCode code, BitCode mubs) throws LockedCodeArrayException, LockedBitCodeException
public int computeHeight(Sort sort) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic BitCode computeDescendants(Sort sort) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic BitCode computeAncestors(Sort sort) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic void showSortCodes()
public void showSortCodes(int first,
int last)