|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orc.runtime.Args
public class Args
Container for arguments to a site.
Nested Class Summary | |
---|---|
static interface |
Args.NumericBinaryOperator<T>
A binary operator on numbers |
static interface |
Args.NumericUnaryOperator<T>
A unary operator on numbers |
Constructor Summary | |
---|---|
Args(java.util.List<java.lang.Object> values)
|
|
Args(java.lang.Object[] values)
|
Method Summary | ||
---|---|---|
static
|
applyNumericOperator(java.lang.Number a,
Args.NumericUnaryOperator<T> op)
Dispatch a unary operator based on the type of a number. |
|
static
|
applyNumericOperator(java.lang.Number a,
java.lang.Number b,
Args.NumericBinaryOperator<T> op)
Dispatch a binary operator based on the widest type of two numbers. |
|
java.lang.Object[] |
asArray()
Return the entire tuple as an object array. |
|
boolean |
boolArg(int n)
Helper function for booleans |
|
java.lang.Object |
condense()
|
|
java.lang.String |
fieldName()
|
|
java.lang.Object |
getArg(int n)
Helper function to retrieve the nth element as an object (starting from 0), with error checking |
|
int |
intArg(int n)
Helper function for integers |
|
java.util.Iterator<java.lang.Object> |
iterator()
|
|
ListLike |
listLikeArg(int n)
|
|
long |
longArg(int n)
Helper function for longs |
|
java.lang.Number |
numberArg(int n)
|
|
int |
size()
|
|
java.lang.String |
stringArg(int n)
Helper function for strings. |
|
Value |
valArg(int n)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Args(java.util.List<java.lang.Object> values)
public Args(java.lang.Object[] values)
Method Detail |
---|
public int size()
public java.lang.Object condense()
@Deprecated public Value valArg(int n) throws TokenException
TokenException
public java.lang.String fieldName() throws TokenException
TokenException
public java.lang.Object getArg(int n) throws TokenException
TokenException
public java.lang.Object[] asArray()
public int intArg(int n) throws TokenException
TokenException
public long longArg(int n) throws TokenException
TokenException
public java.lang.Number numberArg(int n) throws TokenException
TokenException
public boolean boolArg(int n) throws TokenException
TokenException
public java.lang.String stringArg(int n) throws TokenException
TokenException
public ListLike listLikeArg(int n) throws TokenException
TokenException
public static <T> T applyNumericOperator(java.lang.Number a, java.lang.Number b, Args.NumericBinaryOperator<T> op) throws TokenException
TokenException
public static <T> T applyNumericOperator(java.lang.Number a, Args.NumericUnaryOperator<T> op)
public java.util.Iterator<java.lang.Object> iterator()
iterator
in interface java.lang.Iterable<java.lang.Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |