Package com.jml.core

Class Block

java.lang.Object
com.jml.core.Block

public class Block extends Object
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 Details

    • Block

      public Block(String name, String content)
      Constructs a block with specified name and content.
      Parameters:
      name - Name of the block.
      content - Content of the block.
  • Method Details

    • getBlock

      public String getBlock()
      Gets the markup format of the block.
      Returns:
      Returns the block as a string.
    • buildFileContent

      public static String buildFileContent(Block... blocks)
      Builds the content of a markup file containing blocks.
      Parameters:
      blocks - Blocks to form file from.
      Returns:
      The file contents as a string.