|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.arg.ArgumentInterpretationResult<T>
public class ArgumentInterpretationResult<T>
This immutable object contains the result from
ArgumentInterpreter.interpret(Object, ArgumentInterpretationStrategy)
.
Constructor Summary | |
---|---|
protected |
ArgumentInterpretationResult(List<T> interpreted,
List<NotInterpretedObject> notInterpreted)
Create a new result object. |
Method Summary | |
---|---|
T |
get()
Get the first object in the list returned from getInterpreted() . |
List<T> |
getInterpreted()
Get the list of interpreted objects. |
List<NotInterpretedObject> |
getNotInterpreted()
Get a list of the objects that the interpreter was not able to interpret. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ArgumentInterpretationResult(List<T> interpreted, List<NotInterpretedObject> notInterpreted)
interpreted
- The list of interpreted objects.notInterpreted
- The list of objects that the interpreter was not
able to interpret.Method Detail |
---|
public T get()
getInterpreted()
.
This shortcut method can be used when only one result object is expected.
null
if there are no
interpreted objects.public List<T> getInterpreted()
If the ArgumentInterpretationStrategy
is configured with
ArgumentInterpretationStrategy.ALLOW_ONE_AND_ONLY_ONE_RESULT_OBJECT
,
this list will always contain exactly one object.
null
.public List<NotInterpretedObject> getNotInterpreted()
The ArgumentInterpreter.interpret(Object, ArgumentInterpretationStrategy)
method may only return a non-empty list if it is configured with
ArgumentInterpretationStrategy.ALLOW_NOT_INTERPRETED
.
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |