Class BooleanAsStringTransformer
- java.lang.Object
-
- cloud.filibuster.junit.server.core.transformers.BooleanAsStringTransformer
-
- All Implemented Interfaces:
Transformer<java.lang.String,java.lang.String>
public final class BooleanAsStringTransformer extends java.lang.Object implements Transformer<java.lang.String,java.lang.String>
-
-
Constructor Summary
Constructors Constructor Description BooleanAsStringTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Type
getAccumulatorType()
Returns Type representation of the accumulator.Accumulator<java.lang.String,java.lang.String>
getInitialAccumulator(java.lang.String referenceValue)
Returns initial accumulator used in the first transformation.Accumulator<java.lang.String,java.lang.String>
getNextAccumulator()
Returns accumulator of next transformation.java.lang.reflect.Type
getPayloadType()
Returns Type of the payload.java.lang.String
getResult()
Returns payload after applying the transformation.boolean
hasNext()
Returns whether current iteration has a successor.BooleanAsStringTransformer
transform(java.lang.String payload, Accumulator<java.lang.String,java.lang.String> accumulator)
Returns transformer instance containing the payload after applying the transformation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cloud.filibuster.junit.server.core.transformers.Transformer
getInitialAccumulator
-
-
-
-
Method Detail
-
transform
@CanIgnoreReturnValue public BooleanAsStringTransformer transform(java.lang.String payload, Accumulator<java.lang.String,java.lang.String> accumulator)
Description copied from interface:Transformer
Returns transformer instance containing the payload after applying the transformation.- Specified by:
transform
in interfaceTransformer<java.lang.String,java.lang.String>
- Parameters:
payload
- Value to be transformedaccumulator
- Accumulator of current iteration- Returns:
- Transformer
-
hasNext
public boolean hasNext()
Description copied from interface:Transformer
Returns whether current iteration has a successor.- Specified by:
hasNext
in interfaceTransformer<java.lang.String,java.lang.String>
- Returns:
- boolean
-
getPayloadType
public java.lang.reflect.Type getPayloadType()
Description copied from interface:Transformer
Returns Type of the payload.- Specified by:
getPayloadType
in interfaceTransformer<java.lang.String,java.lang.String>
- Returns:
- Type of the payload
-
getResult
public java.lang.String getResult()
Description copied from interface:Transformer
Returns payload after applying the transformation. The transform method should be called at least once before this method.- Specified by:
getResult
in interfaceTransformer<java.lang.String,java.lang.String>
- Returns:
- Payload
-
getAccumulatorType
public java.lang.reflect.Type getAccumulatorType()
Description copied from interface:Transformer
Returns Type representation of the accumulator. This method is used to serialize the accumulator in Gson.- Specified by:
getAccumulatorType
in interfaceTransformer<java.lang.String,java.lang.String>
- Returns:
- Type representation of the accumulator
-
getInitialAccumulator
public Accumulator<java.lang.String,java.lang.String> getInitialAccumulator(java.lang.String referenceValue)
Description copied from interface:Transformer
Returns initial accumulator used in the first transformation.- Specified by:
getInitialAccumulator
in interfaceTransformer<java.lang.String,java.lang.String>
- Parameters:
referenceValue
- reference value used in the initial accumulator- Returns:
- Initial accumulator
-
getNextAccumulator
public Accumulator<java.lang.String,java.lang.String> getNextAccumulator()
Description copied from interface:Transformer
Returns accumulator of next transformation.- Specified by:
getNextAccumulator
in interfaceTransformer<java.lang.String,java.lang.String>
- Returns:
- Generic accumulator
-
-