Package com.jml.core
Class Block
java.lang.Object
com.jml.core.Block
Blocks are used to define a model. They can be converted to a markup style equivalent to
< name>
content
</name>
This is useful for saving models in a text format.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildFileContent(Block... blocks)Builds the content of a markup file containing blocks.getBlock()Gets the markup format of the block.
-
Constructor Details
-
Block
Constructs a block with specified name and content.- Parameters:
name- Name of the block.content- Content of the block.
-
-
Method Details
-
getBlock
Gets the markup format of the block.- Returns:
- Returns the block as a string.
-
buildFileContent
Builds the content of a markup file containing blocks.- Parameters:
blocks- Blocks to form file from.- Returns:
- The file contents as a string.
-