Class JsonWriteContext.TryWrite
- java.lang.Object
- 
- jadex.transformation.jsonserializer.processors.JsonWriteContext.TryWrite
 
- 
- Enclosing class:
- JsonWriteContext
 
 public static class JsonWriteContext.TryWrite extends java.lang.ObjectTry.style monad for stateful write to the write context, handling first writes specially.
- 
- 
Field SummaryFields Modifier and Type Field Description protected JsonWriteContextcontextWrute context.protected booleanfirstFirst write state.protected booleanonlyfirstWrite only first attempt.
 - 
Constructor SummaryConstructors Constructor Description TryWrite(JsonWriteContext context)Initialized the monad.TryWrite(JsonWriteContext context, boolean onlyfirst)Initialized the monad.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonWriteContextwrite(java.lang.String value)Write or not depending on state.
 
- 
- 
- 
Field Detail- 
firstprotected boolean first First write state.
 - 
onlyfirstprotected boolean onlyfirst Write only first attempt.
 - 
contextprotected JsonWriteContext context Wrute context.
 
- 
 - 
Constructor Detail- 
TryWritepublic TryWrite(JsonWriteContext context) Initialized the monad.- Parameters:
- context- Write context.
 
 - 
TryWritepublic TryWrite(JsonWriteContext context, boolean onlyfirst) Initialized the monad.- Parameters:
- context- Write context.
- onlyfirst- Write only on first write instead of every write except the first.
 
 
- 
 - 
Method Detail- 
writepublic JsonWriteContext write(java.lang.String value) Write or not depending on state.- Parameters:
- value- Value to write.
- Returns:
- The context for convenience.
 
 
- 
 
-