|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
R - the type of pair being modifiedpublic interface ModifiablePair<R>
A template for the client in a visitor pattern. This class allows one to define a chain of processing operations on a pair:
DefaultPairp = new DefaultPair (person1,person2); ModfiablePair mp = new ModifiableGeneratedPair0 (p); List >> processors = ; for (PairModifier > processor : processors) { mp = mp.acceptModification(processor); }
| Method Summary | |
|---|---|
ModifiablePair<R> |
acceptModification(PairModifier<R,ModifiablePair<R>> modifier)
Accepts modification by the specified pair modifier. |
PairModifier.ModificationResult |
getCurrentStatus()
Returns the result of the last modification to this instance. |
void |
setCurrentStatus(PairModifier.ModificationResult currentStatus)
Sets the result of the last modification to this instance. |
| Methods inherited from interface com.choicemaker.shared.api.CMPair |
|---|
getLeft, getRight, iterator, setLeft, setRight |
| Method Detail |
|---|
PairModifier.ModificationResult getCurrentStatus()
void setCurrentStatus(PairModifier.ModificationResult currentStatus)
ModifiablePair<R> acceptModification(PairModifier<R,ModifiablePair<R>> modifier)
throws ModificationException
ModificationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||