Interface WritingMechanism
-
- All Known Implementing Classes:
YamlWritingMechanism
public interface WritingMechanism
Class implementing this interface defines mechanism for writing basic structures: primitive types, sequences and maps.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WritingMechanism
writeMapping(Runnable task)
Writes a mapping, items of which are written using this mechanism in thetask
.WritingMechanism
writeObject(Object value)
Writes a value of a primitive type (null
, boolean, number, String).WritingMechanism
writePair(String key, Runnable valueTask)
Writes a mapping key/value pair, items of which are written using this mechanism in thetask
.WritingMechanism
writeSequence(Runnable task)
Writes a sequence, items of which are written using this mechanism in thetask
.
-
-
-
Method Detail
-
writeObject
WritingMechanism writeObject(Object value)
Writes a value of a primitive type (null
, boolean, number, String).- Parameters:
value
-- Returns:
-
writeSequence
WritingMechanism writeSequence(Runnable task)
Writes a sequence, items of which are written using this mechanism in thetask
.- Parameters:
task
-- Returns:
-
writeMapping
WritingMechanism writeMapping(Runnable task)
Writes a mapping, items of which are written using this mechanism in thetask
.- Parameters:
task
-- Returns:
-
writePair
WritingMechanism writePair(String key, Runnable valueTask)
Writes a mapping key/value pair, items of which are written using this mechanism in thetask
.- Parameters:
valueTask
-- Returns:
-
-