public enum VarUsage extends Enum<VarUsage>
Enum Constant and Description |
---|
MORE_THAN_ONCE
More than one usage.
|
NEVER
No usages.
|
ONCE
Exactly one usage.
|
Modifier and Type | Method and Description |
---|---|
VarUsage |
max(VarUsage other)
Combines the usages for two alternative branches.
|
static VarUsage |
maximum(Var var,
Expr... exprs)
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 var,
Expr... exprs)
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(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.
|
public static final VarUsage NEVER
public static final VarUsage ONCE
public static final VarUsage MORE_THAN_ONCE
public static VarUsage[] values()
for (VarUsage c : VarUsage.values()) System.out.println(c);
public static VarUsage valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic VarUsage max(VarUsage other)
other
- usage count to be combinedpublic VarUsage plus(VarUsage other)
other
- usage count to be combinedpublic VarUsage times(long count)
count
times.count
- number of executions, may be -1
if not knownpublic static VarUsage sum(Var var, Expr... exprs)
var
- variableexprs
- expressionsCopyright © 2005–2015 BaseX Team. All rights reserved.