示例#1
0
 public BigDecimal get_ymax() {
   BigDecimal ymax = values.get(0).gety();
   for (ValuePair pair : values) {
     if (pair.gety().compareTo(ymax) > 0) {
       ymax = pair.gety();
     }
   }
   return ymax;
 }
示例#2
0
 public BigDecimal get_ymin() {
   BigDecimal ymin = values.get(0).gety();
   for (ValuePair pair : values) {
     if (pair.gety().compareTo(ymin) < 0) {
       ymin = pair.gety();
     }
   }
   return ymin;
 }
示例#3
0
 public void y_truncate(BigDecimal ymin, BigDecimal ymax) {
   Iterator<ValuePair> iter = this.values.iterator();
   while (iter.hasNext()) {
     ValuePair next = iter.next();
     if (next.gety().compareTo(ymin) == -1 || next.gety().compareTo(ymax) == 1) {
       System.out.println("asd: " + next.gety() + ymax);
       iter.remove();
     }
   }
 }