Package org.esa.snap.core.dataop.barithm
Class SingleFlagSymbol
java.lang.Object
org.esa.snap.core.dataop.barithm.RasterDataSymbol
org.esa.snap.core.dataop.barithm.SingleFlagSymbol
Represents a read-only symbol. A symbol can be a named constant or variable.
It has a return type an can be evaluated. This class represents a specific implementation for flag expressions.
Within an expression, a reference to a symbol is created if the parser
encounters a name and this name can be resolved through the parser's current namespace.
The resulting term in this case is an instance of .Term.Ref
-
Nested Class Summary
Nested classes/interfaces inherited from class org.esa.snap.core.dataop.barithm.RasterDataSymbol
RasterDataSymbol.Source -
Field Summary
Fields inherited from class org.esa.snap.core.dataop.barithm.RasterDataSymbol
data, GEOPHYSICAL, RAW -
Constructor Summary
ConstructorsConstructorDescriptionSingleFlagSymbol(String symbolName, RasterDataNode raster, int flagMask) SingleFlagSymbol(String symbolName, RasterDataNode raster, int flagMask, int flagValue) -
Method Summary
Modifier and TypeMethodDescriptionclone()final booleanEvaluates this symbol to abooleanvalue.final doubleEvaluates this symbol to adoublevalue.final intEvaluates this symbol to anintvalue.final intReturns the flag mask used by this symbol.final intReturns the flag value used by this symbol.final intGets the symbol's return type.
-
Constructor Details
-
SingleFlagSymbol
-
SingleFlagSymbol
-
-
Method Details
-
getRetType
public final int getRetType()Description copied from interface:SymbolGets the symbol's return type.- Specified by:
getRetTypein interfaceSymbol- Overrides:
getRetTypein classRasterDataSymbol- Returns:
- the type, should always be one of the
TYPE_X constants defined in theTermclass.
-
getFlagMask
public final int getFlagMask()Returns the flag mask used by this symbol.- Returns:
- the flag mask.
-
getFlagValue
public final int getFlagValue()Returns the flag value used by this symbol.- Returns:
- the flag mask.
-
evalB
Description copied from interface:SymbolEvaluates this symbol to abooleanvalue.- Specified by:
evalBin interfaceSymbol- Overrides:
evalBin classRasterDataSymbol- Parameters:
env- the application dependant environment.- Returns:
- a
booleanvalue - Throws:
EvalException- if the evaluation fails
-
evalI
Description copied from interface:SymbolEvaluates this symbol to anintvalue.- Specified by:
evalIin interfaceSymbol- Overrides:
evalIin classRasterDataSymbol- Parameters:
env- the application dependant environment.- Returns:
- an
intvalue - Throws:
EvalException- if the evaluation fails
-
evalD
Description copied from interface:SymbolEvaluates this symbol to adoublevalue.- Specified by:
evalDin interfaceSymbol- Overrides:
evalDin classRasterDataSymbol- Parameters:
env- the application dependant environment.- Returns:
- a
doublevalue - Throws:
EvalException- if the evaluation fails
-
clone
- Overrides:
clonein classRasterDataSymbol
-