コード例 #1
0
ファイル: Utils.java プロジェクト: Fastest/FastestMBT
  /**
   * This function obtains from a list of Equality's objects the Equality object which is related
   * with an identifier of the specification. The Equality's objects are used for refine one
   * variable in the specification to more than one variable in the specification.
   *
   * @param implID The identifier of a variable in the implementation
   * @param equalities A list of Equality's objects
   * @return the related equality
   */
  public static Equality getAssociatedEquality(String implID, List<Equality> equalities) {
    for (int i = 0; i < equalities.size(); i++) {
      Equality equality = equalities.get(i);
      String plCode = equality.getPLCodeEquality();
      plCode = plCode.trim();
      plCode = plCode.substring(0, plCode.length() - 1);

      if (plCode.equals(implID)) return equality;
    }
    return null;
  }
コード例 #2
0
ファイル: Utils.java プロジェクト: Fastest/FastestMBT
 // Cuando evolucione el refinamiento esta funcion sera insuficiente porque voy a poder tener
 // codigo
 // ademas de identificadores. Posiblemente haya que agregar algo a TCRL
 public static String getRelatedImplID(Equality equality) {
   // No sera correcto en el futuro
   String implID = equality.getPLCodeEquality();
   implID = implID.trim();
   implID = implID.substring(0, implID.length() - 1);
   System.out.println("EL id es: " + implID);
   return implID.trim();
 }