Class MpHelper

java.lang.Object
pl.decerto.hyperon.runtime.helper.MpHelper

public class MpHelper extends Object
Author:
przemek hertel
  • Field Details

    • MAX_LEVELS

      public static final int MAX_LEVELS
      The number of columns in the database to record levels.
      See Also:
  • Constructor Details

    • MpHelper

      public MpHelper()
  • Method Details

    • createEntry

      public MpParameterEntry createEntry(Parameter p, String... columns)
    • createEntry

      public MpParameterEntry createEntry(int levelCnt, String... columns)
      Parameters:
      levelCnt - number of all levels in parameter
      columns - next chambers from the matrix row
      Returns:
      MpParameterEntry object
    • createEntry

      public MpParameterEntry createEntry(LevelMapper mapper, String... columns)
      Parameters:
      mapper - maps master levels to slave levels
      columns - next chambers from the matrix row
      Returns:
      MpParameterEntry object
    • createEntry

      public MpParameterEntry createEntry(String... cells)
    • normalize

      public String[] normalize(String... cells)
      assumptions: - there are n cells in a row - n-1 cells contain a single value (normal) - the last nth cell contains (potentially) the value of the several levels (vararg)
      Parameters:
      cells - String object with cells value
      Returns:
      separated from each other values of all levels
    • toDatabaseColumns

      public String[][] toDatabaseColumns(String[][] logicalCells, int max)
    • toDatabaseColumns

      public String[][] toDatabaseColumns(String[][] logicalCells)
    • ensureLength

      public String[] ensureLength(String[] row, int length)
    • copyDefinition

      public Parameter copyDefinition(Parameter src)
      - copies all information but matrix - sets number of matrix rows
      Parameters:
      src - Parameter object
      Returns:
      Parameter object
    • createInListPattern

      public String createInListPattern(int n)
    • unify

      public String unify(String str)