Class MapLevelBuilder

java.lang.Object
fr.r1r0r0.deltaengine.model.maplevel.MapLevelBuilder
All Implemented Interfaces:
Builder<MapLevel>

public final class MapLevelBuilder
extends java.lang.Object
implements Builder<MapLevel>
A Builder of MapLevel
See Also:
MapLevel, Builder, CellBuilder
  • Field Summary

    Fields
    Modifier and Type Field Description
    private Cell[][] cells  
    private CellBuilder defaultCellBuilder  
    private int height  
    private java.lang.String name  
    private static CellBuilder VOID_CELL_BUILDER
    A CellBuilder of VoidCell
    private int width  
  • Constructor Summary

    Constructors
    Constructor Description
    MapLevelBuilder​(java.lang.String name, int width, int height)
    Constructor The attribute defaultCellBuilder is set to VOID_CELL_BUILDER
    MapLevelBuilder​(java.lang.String name, int width, int height, CellBuilder defaultCellBuilder)
    Constructor
  • Method Summary

    Modifier and Type Method Description
    MapLevel build()
    A method to build an object of type E
    Builder<MapLevel> setCell​(Cell cell)
    Setter for the cell at the coordinate given by the cell coordinates
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • VOID_CELL_BUILDER

      private static final CellBuilder VOID_CELL_BUILDER
      A CellBuilder of VoidCell
    • name

      private final java.lang.String name
    • width

      private final int width
    • height

      private final int height
    • cells

      private final Cell[][] cells
    • defaultCellBuilder

      private final CellBuilder defaultCellBuilder
  • Constructor Details

    • MapLevelBuilder

      public MapLevelBuilder​(java.lang.String name, int width, int height, CellBuilder defaultCellBuilder)
      Constructor
      Parameters:
      name - name of the map
      width - with of the map
      height - height of the map
      defaultCellBuilder - defaultCellBuilder for the cell not difined in the map
    • MapLevelBuilder

      public MapLevelBuilder​(java.lang.String name, int width, int height)
      Constructor The attribute defaultCellBuilder is set to VOID_CELL_BUILDER
      Parameters:
      name - name of the map
      width - with of the map
      height - height of the map
  • Method Details