public class LongValueAddOffset extends Object implements TranslateFunction<LongValue,LongValue>
LongValue
by adding a constant offset value.Constructor and Description |
---|
LongValueAddOffset(long offset)
Translate
LongValue by adding a constant offset value. |
Modifier and Type | Method and Description |
---|---|
LongValue |
translate(LongValue value,
LongValue reuse)
The translating method.
|
public LongValueAddOffset(long offset)
LongValue
by adding a constant offset value.
The summation is *not* checked for overflow or underflow.
offset
- value to be added to each elementpublic LongValue translate(LongValue value, LongValue reuse) throws Exception
TranslateFunction
translate
in interface TranslateFunction<LongValue,LongValue>
value
- input value.reuse
- value which may be reused for output; if reuse is null then a new output object
must be instantiated and returnedException
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.