Package java.math

Examples of java.math.BigDecimal.min()


    public BigDecimal typedReduce(Key key, Iterator<BigDecimal> iter) {
      if (!iter.hasNext())
        return null;
      BigDecimal min = iter.next();
      while (iter.hasNext()) {
        min = min.min(iter.next());
      }
      return min;
    }
  }
 
View Full Code Here


            bi = ObjectToBigDecimal(objeto);

            if(esFecha(tmodel.columnTypes[colx]) == false)
            {
                biColXMax = bi.max(biColXMax);
                biColXMin = bi.min(biColXMin);
            }
            else
            {
                if(tiColXMax.compareTo(new Timestamp(bi.longValue())) < 0)
                    tiColXMax = new Timestamp(bi.longValue());
View Full Code Here

                bi = ObjectToBigDecimal(objeto);

                if(esFecha(tmodel.columnTypes[coly[0]]) == false)
                {
                    biColYMax = bi.max(biColYMax);
                    biColYMin = bi.min(biColYMin);
                }
                else
                {
                    if(tiColYMax.compareTo(new Timestamp(bi.longValue())) < 0)
                        tiColYMax = new Timestamp(bi.longValue());
View Full Code Here

        });

        BigDecimal expectation = BigDecimal.ZERO;
        for (int i = 0; i < values.length; i++) {
            Value<BigDecimal> value = values[i];
            expectation = i == 0 ? value.value : expectation.min(value.value);
        }

        Aggregation<String, BigDecimal, BigDecimal> aggregation = Aggregations.bigDecimalMin();
        BigDecimal result = testMinWithExtractor(values, aggregation);
        assertEquals(expectation, result);
View Full Code Here

            @Override
            public BigDecimal collate(Iterable<Map.Entry<Key, BigDecimal>> values) {
                BigDecimal min = null;
                for (Map.Entry<Key, BigDecimal> entry : values) {
                    BigDecimal value = entry.getValue();
                    min = min == null ? value : value.min(min);
                }
                return min;
            }
        };
    }
View Full Code Here

        });

        BigDecimal expectation = BigDecimal.ZERO;
        for (int i = 0; i < values.length; i++) {
            Value<BigDecimal> value = values[i];
            expectation = i == 0 ? value.value : expectation.min(value.value);
        }

        Aggregation<String, BigDecimal, BigDecimal> aggregation = Aggregations.bigDecimalMin();
        BigDecimal result = testMinWithExtractor(values, aggregation);
        assertEquals(expectation, result);
View Full Code Here

        });

        BigDecimal expectation = BigDecimal.ZERO;
        for (int i = 0; i < values.length; i++) {
            Value<BigDecimal> value = values[i];
            expectation = i == 0 ? value.value : expectation.min(value.value);
        }

        Aggregation<String, BigDecimal, BigDecimal> aggregation = Aggregations.bigDecimalMin();
        BigDecimal result = testMinWithExtractor(values, aggregation);
        assertEquals(expectation, result);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.