public static class Task.Context
extends Object
Modifier | Constructor and Description |
---|---|
protected |
Context(ResultValue resultValue,
boolean failReturnsNull,
Optional<Batch> batch,
Optional<TimeZone> timeZone,
Logger logger)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addUpdate(PointValue update)
Adds an update.
|
protected void |
cancel()
Cancels the processing.
|
DateTime.Context |
getDateTimeContext()
Gets the DateTime context.
|
protected boolean |
getFailReturnsNull()
Gets the FailReturnsNull indicator.
|
int[] |
getInputLimits()
Gets input limits.
|
protected Optional<PointValue> |
getInputValue(int index)
Gets a numbered input.
|
Logger |
getLogger()
Gets the logger.
|
Serializable |
getMemoryValue(int index)
Gets a memory value.
|
Optional<NormalizedValue> |
getNormalizedInputValue(int index)
Gets a normalized input value.
|
PointValue |
getNormalizedResultValue()
Gets the result value.
|
Optional<String> |
getParamValue(int index)
Gets a param value.
|
Optional<PointValue> |
getResult()
Gets the result.
|
Optional<Point> |
getResultPoint()
Gets the result point.
|
Optional<PointValue> |
getStoredValue()
Gets the stored value.
|
void |
setInputValue(int index,
NormalizedValue inputValue)
Sets an input value.
|
void |
setMemoryValue(int index,
Serializable value)
Sets a memory value.
|
void |
setTimeZone(Optional<TimeZone> timeZone)
Sets the time zone.
|
protected void |
update(Serializable value)
Updates the result.
|
protected Context(@Nonnull ResultValue resultValue, boolean failReturnsNull, @Nonnull Optional<Batch> batch, @Nonnull Optional<TimeZone> timeZone, @Nonnull Logger logger)
resultValue
- The requested result value.failReturnsNull
- The FailReturnsNull indicator.batch
- The current Batch context (optional).timeZone
- The time zone (optional).logger
- The logger.public void addUpdate(@Nonnull PointValue update)
update
- The update.@Nonnull @CheckReturnValue public DateTime.Context getDateTimeContext()
@Nonnull @CheckReturnValue public int[] getInputLimits()
@Nonnull @CheckReturnValue public Logger getLogger()
@Nullable @CheckReturnValue public Serializable getMemoryValue(int index)
index
- The origin 0 index of the value.@Nonnull @CheckReturnValue public Optional<NormalizedValue> getNormalizedInputValue(int index)
index
- The origin 0 index of the value.@Nonnull @CheckReturnValue public PointValue getNormalizedResultValue()
@Nonnull @CheckReturnValue public Optional<String> getParamValue(int index)
index
- The origin 0 index of the value.@Nonnull @CheckReturnValue public Optional<PointValue> getResult()
@Nonnull @CheckReturnValue public Optional<Point> getResultPoint()
@Nonnull @CheckReturnValue public Optional<PointValue> getStoredValue()
public void setInputValue(int index, @Nonnull NormalizedValue inputValue)
index
- The origin 0 index of the value.inputValue
- The new input value.public void setMemoryValue(int index, @Nullable Serializable value)
index
- The origin 0 index of the value.value
- The new value.public void setTimeZone(@Nonnull Optional<TimeZone> timeZone)
timeZone
- The optional time zone.protected void cancel()
@CheckReturnValue protected boolean getFailReturnsNull()
@Nonnull @CheckReturnValue protected Optional<PointValue> getInputValue(int index)
index
- An origin zero index identifying the input.protected void update(@Nullable Serializable value)
value
- The new value for the result.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.