|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- The element type that has labels that can be extracted.L
- The type of the label that this Extractor
extracts
out of elements of type E
.public interface Extractor<E,L>
An Extractor
takes an element (or part of an element) from an
object and returns it as a label. The label is the value
that is actually discriminated. Examples of labels include one character in
a String, or the high-order 16 bits of an integer.
Method Summary | |
---|---|
L |
getLabel(E element)
Returns the label for a given element. |
boolean |
isAllComplete()
The specific Discriminator calls this method to determine
whether all elements in the current equivalence class were complete. |
boolean |
isComplete(E element)
Determines whether discrimination is complete for the given element, at the given index. |
void |
setAllComplete(boolean allComplete)
The Discriminator calls this method to indicate whether all
elements in its current equivalence class were complete. |
Method Detail |
---|
L getLabel(E element)
element
- The element.
boolean isComplete(E element)
element
- The element.
true
if discrimination is complete or cannot
continue, usually because the discrimination has run off the end of
the label, false
otherwise.void setAllComplete(boolean allComplete)
Discriminator
calls this method to indicate whether all
elements in its current equivalence class were complete.
allComplete
- Whether all elements were complete.boolean isAllComplete()
Discriminator
calls this method to determine
whether all elements in the current equivalence class were complete.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |