Class DefaultBuildGridImpl


public class DefaultBuildGridImpl extends BuildGrid
BuildGrid implementation backed by a sparse array.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • DefaultBuildGridImpl

      public DefaultBuildGridImpl()
  • Method Details

    • set

      public void set(int row, int col, BuildForm p)
      Mutable, but only for the code that instantiates DefaultBuildGridImpl.
      Parameters:
      row - position of the form
      col - position of the form
      p - The build to add. null to remove the value.
    • get

      public BuildForm get(int row, int col)
      Description copied from class: Grid
      Obtains the project placed at the specific position.
      Specified by:
      get in class Grid<BuildForm>
      Parameters:
      row - 0&lt;=row&lt;getRows()
      col - 0&lt;=col&lt;getColumns()
      Returns:
      null if there's nothing placed in that position.
    • getColumns

      public int getColumns()
      Description copied from class: Grid
      Width of the grid. Total number of columns.
      Specified by:
      getColumns in class Grid<BuildForm>
      Returns:
      positive integer
    • getRows

      public int getRows()
      Description copied from class: Grid
      Height of the grid. Total number of rows.
      Specified by:
      getRows in class Grid<BuildForm>
      Returns:
      positive integer