Exemplo n.º 1
0
  @Override
  public Comparable value(NodeCommonMap node) {
    ComparableSet result = new ComparableSet();
    for (Expression exp : expressions) {
      result.add(exp.value(node));
    }

    return result;
  }
Exemplo n.º 2
0
 @Override
 public int compareTo(ComparableSet o) {
   Comparable[] thisArray = toArray(new Comparable[0]);
   Comparable[] thatArray = o.toArray(new Comparable[0]);
   for (int i = 0; i < thisArray.length; i++) {
     if (thatArray.length <= i) return 1;
     if (thisArray[i].compareTo(thatArray[i]) != 0) return thisArray[i].compareTo(thatArray[i]);
   }
   if (thatArray.length > thisArray.length) return -1;
   return 0;
 }