Example #1
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;
 }
Example #2
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;
 }
Example #3
0
 public void x_truncate(BigDecimal xmin, BigDecimal xmax) {
   Iterator<ValuePair> iter = this.values.iterator();
   while (iter.hasNext()) {
     ValuePair next = iter.next();
     if (next.getx().compareTo(xmin) == -1 || next.getx().compareTo(xmax) == 1) {
       iter.remove();
     }
   }
 }
Example #4
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();
     }
   }
 }