Class StringBasicByzantineValueTransformer
- java.lang.Object
-
- cloud.filibuster.junit.server.core.transformers.StringBasicByzantineValueTransformer
-
- All Implemented Interfaces:
Transformer<java.lang.String,java.lang.Integer>
public final class StringBasicByzantineValueTransformer extends java.lang.Object implements Transformer<java.lang.String,java.lang.Integer>
-
-
Constructor Summary
Constructors Constructor Description StringBasicByzantineValueTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.TypegetAccumulatorType()Returns Type representation of the accumulator.Accumulator<java.lang.String,java.lang.Integer>getInitialAccumulator(java.lang.String referenceValue)Returns initial accumulator used in the first transformation.Accumulator<java.lang.String,java.lang.Integer>getNextAccumulator()Returns accumulator of next transformation.java.lang.reflect.TypegetPayloadType()Returns Type of the payload.java.lang.StringgetResult()Returns payload after applying the transformation.booleanhasNext()Returns whether current iteration has a successor.StringBasicByzantineValueTransformertransform(java.lang.String payload, Accumulator<java.lang.String,java.lang.Integer> 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 StringBasicByzantineValueTransformer transform(java.lang.String payload, Accumulator<java.lang.String,java.lang.Integer> accumulator)
Description copied from interface:TransformerReturns transformer instance containing the payload after applying the transformation.- Specified by:
transformin interfaceTransformer<java.lang.String,java.lang.Integer>- Parameters:
payload- Value to be transformedaccumulator- Accumulator of current iteration- Returns:
- Transformer
-
hasNext
public boolean hasNext()
Description copied from interface:TransformerReturns whether current iteration has a successor.- Specified by:
hasNextin interfaceTransformer<java.lang.String,java.lang.Integer>- Returns:
- boolean
-
getPayloadType
public java.lang.reflect.Type getPayloadType()
Description copied from interface:TransformerReturns Type of the payload.- Specified by:
getPayloadTypein interfaceTransformer<java.lang.String,java.lang.Integer>- Returns:
- Type of the payload
-
getResult
public java.lang.String getResult()
Description copied from interface:TransformerReturns payload after applying the transformation. The transform method should be called at least once before this method.- Specified by:
getResultin interfaceTransformer<java.lang.String,java.lang.Integer>- Returns:
- Payload
-
getAccumulatorType
public java.lang.reflect.Type getAccumulatorType()
Description copied from interface:TransformerReturns Type representation of the accumulator. This method is used to serialize the accumulator in Gson.- Specified by:
getAccumulatorTypein interfaceTransformer<java.lang.String,java.lang.Integer>- Returns:
- Type representation of the accumulator
-
getInitialAccumulator
public Accumulator<java.lang.String,java.lang.Integer> getInitialAccumulator(java.lang.String referenceValue)
Description copied from interface:TransformerReturns initial accumulator used in the first transformation.- Specified by:
getInitialAccumulatorin interfaceTransformer<java.lang.String,java.lang.Integer>- Parameters:
referenceValue- reference value used in the initial accumulator- Returns:
- Initial accumulator
-
getNextAccumulator
public Accumulator<java.lang.String,java.lang.Integer> getNextAccumulator()
Description copied from interface:TransformerReturns accumulator of next transformation.- Specified by:
getNextAccumulatorin interfaceTransformer<java.lang.String,java.lang.Integer>- Returns:
- Generic accumulator
-
-