|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<VarUsage>
org.basex.query.var.VarUsage
public enum VarUsage
A tri-state encoding the number of usages of a variable.
Enum Constant Summary | |
---|---|
MORE_THAN_ONCE
More than one usage. |
|
NEVER
No usages. |
|
ONCE
Exactly one usage. |
Method Summary | |
---|---|
VarUsage |
max(VarUsage other)
Combines the usages for two alternative branches. |
static VarUsage |
maximum(Var v,
Expr... es)
Checks how often the given variable is used in any of the given expressions. |
VarUsage |
plus(VarUsage other)
Combines the usages for two expressions that are both executed. |
static VarUsage |
sum(Var v,
Expr... es)
Checks how often the given variable is accessed in all of the given expressions. |
VarUsage |
times(long count)
Number of usages of the variable if the code is executed count times. |
static VarUsage |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static VarUsage[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final VarUsage NEVER
public static final VarUsage ONCE
public static final VarUsage MORE_THAN_ONCE
Method Detail |
---|
public static VarUsage[] values()
for (VarUsage c : VarUsage.values()) System.out.println(c);
public static VarUsage valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic VarUsage max(VarUsage other)
other
- usage count to be combined
public VarUsage plus(VarUsage other)
other
- usage count to be combined
public VarUsage times(long count)
count
times.
count
- number of executions, may be -1
if not known
public static VarUsage sum(Var v, Expr... es)
v
- variablees
- expressions
public static VarUsage maximum(Var v, Expr... es)
v
- variablees
- expressions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |