|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InspectableOrderedDictionary
A read-only lookup structure in which an ordering of the keys is maintained; please refer to the documentation of OrderedDictionary for more details.
OrderedDictionary
,
InspectableDictionary
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nz.ac.waikato.jdsl.core.api.InspectableDictionary |
---|
InspectableDictionary.InvalidLocator |
Field Summary | |
---|---|
static Locator |
BOUNDARY_VIOLATION
Object returned from all four methodsof InspectableOrderedDictionary to indicate that the user tried to access before the first element of the dictionary or after the last. |
Fields inherited from interface nz.ac.waikato.jdsl.core.api.InspectableDictionary |
---|
NO_SUCH_KEY |
Method Summary | |
---|---|
Locator |
after(Locator locator)
Returns the Locator that is sequentially after another Locator in this Container. |
Locator |
before(Locator locator)
Returns the Locator that is sequentially before another Locator in this Container. |
Locator |
closestAfter(java.lang.Object key)
Returns the locator with smallest key greater than or equal to the search key. |
Locator |
closestBefore(java.lang.Object key)
Returns the locator with largest key less than or equal to the search key. |
Locator |
first()
Returns the Locator that is sequentially before any other Locator in this Container. |
Locator |
last()
Returns the Locator that is sequentially after any other Locator in this Container. |
Methods inherited from interface nz.ac.waikato.jdsl.core.api.InspectableDictionary |
---|
find, findAll |
Methods inherited from interface nz.ac.waikato.jdsl.core.api.InspectableKeyBasedContainer |
---|
keys, locators |
Methods inherited from interface nz.ac.waikato.jdsl.core.api.InspectableContainer |
---|
contains, elements, isEmpty, size |
Field Detail |
---|
static final Locator BOUNDARY_VIOLATION
Method Detail |
---|
Locator before(Locator locator) throws InvalidAccessorException
locator
- An abstract position in this Container.
locator
. Note: Will return the invalid
BOUNDARY_VIOLATION Locator if no such locator exists.
InvalidAccessorException
- If locator
is
invalid (For example: It does not actually reference an element
within this Container).Locator after(Locator locator) throws InvalidAccessorException
locator
- An abstract position in this Container.
locator
. Note: Will return the invalid
BOUNDARY_VIOLATION Locator if no such locator exists.
InvalidAccessorException
- If locator
is
invalid (For example: It does not actually reference an element
within this Container).Locator closestBefore(java.lang.Object key) throws InvalidKeyException
key
- A valid key.
key
. Note: If no such locator exists, the
returned locator will be BOUNDARY_VIOLATION.
InvalidKeyException
- If key
is not of a
type accepted by this Container (For example: the key is not
comparable).Locator closestAfter(java.lang.Object key) throws InvalidKeyException
key
- A valid key.
key
. Note: If no such Locator exists, the
returned locator will be BOUNDARY_VIOLATION.
InvalidKeyException
- If key
is not of a
type accepted by this Container (For example: the key is not
comparable).Locator first()
Locator last()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |