コード例 #1
0
  /** Returns null if the string is not a ModelName. */
  public static ModelName getModelName(String string) {
    if (StringUtils.isEmpty(string)) return null;

    try {
      return ModelName.valueOf(string.trim().toUpperCase());
    } catch (IllegalArgumentException ex) {
      // Did not find value in enum ModelName for the string, no problem.
      return null;
    }
  }
コード例 #2
0
 /**
  * Checks if is cellular automaton.
  *
  * @return true, if is cA
  */
 public boolean isCA() {
   return modelName.getCategory().isCA();
 }
コード例 #3
0
 /**
  * Checks if is iterated map.
  *
  * @return true, if is iterated map
  */
 public boolean isIteratedMap() {
   return modelName.getCategory().isIteratedMap();
 }
コード例 #4
0
 /**
  * Gets the model category.
  *
  * @return the model category
  */
 public ModelCategory getModelCategory() {
   return modelName.getCategory();
 }