Beispiel #1
0
  /* is the given variable a neighbor of this variable?*/
  public boolean isNeighbor(Variable v) {

    for (int i = 0; i < neighbors.size(); i++) {
      Variable vv = (Variable) neighbors.elementAt(i);
      if (v.equalVar(vv)) return true;
    }
    return false;
  }
Beispiel #2
0
 /* is the given variable equal to 'this'?*/
 public boolean equalVar(Variable v) {
   if (v.uniqueNameOf().equals(uniqueNameOf())) return true;
   return false;
 }
Beispiel #3
0
 /* Returns a negative integer, zero, or a positive integer as val1
 is less than, equal to, or greater val2. */
 public int compareValues(Value val1, Value val2) {
   return Variable.compareIntValues(val1, val2);
 }