Examples of max()


Examples of org.apache.hadoop.hbase.client.coprocessor.AggregationClient.max()

  public void testMax() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal maximum = aClient.max(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("19.00"), maximum);
  }

  /**
   * @throws Throwable
View Full Code Here

Examples of org.apache.velocity.tools.generic.MathTool.max()

        assertEquals(5,mathTool.floor(5.1));
        assertEquals(6,mathTool.getAverage(new long[] {5,6,7}));
        /* getTotal() watches the type of its first argument, so assertEquals needs a long */
        assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3}));
        assertEquals(8,mathTool.idiv(130,16));
        assertEquals(9,mathTool.max(9,-10));
        assertEquals(10,mathTool.min(10,20));
        assertEquals(11,mathTool.mod(37,13));
        assertEquals(12,mathTool.mul(3,4));
        assertEquals(13,mathTool.round(12.8));
        assertEquals(14.2,mathTool.roundTo(1,14.18));
View Full Code Here

Examples of org.broadleafcommerce.common.money.Money.max()

            if (propertyObject == null) {
                min = new Money(0D);
                max = new Money(0D);
            } else {
                min = propertyObject.min(min);
                max = propertyObject.max(max);
            }
        }

        String propertyCss = property.replaceAll("[.\\[\\]]", "_");
View Full Code Here

Examples of org.eclipse.sapphire.modeling.annotations.CountConstraint.max()

    @Override
    protected void facts( final SortedSet<String> facts )
    {
        final CountConstraint constraint = context( PropertyDef.class ).getAnnotation( CountConstraint.class );
        final int min = constraint.min();
        final int max = constraint.max();
       
        if( min == 1 )
        {
            facts.add( atLeastOneStatement.text() );
        }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.annotations.NumericRange.max()

        if( minStr != null )
        {
            this.min = ( minStr.length() > 0 ? (Comparable) converter.convert( minStr, type ) : null );
        }
       
        final String maxStr = rangeConstraintAnnotation.max();
       
        if( maxStr != null )
        {
            this.max = ( maxStr.length() > 0 ? (Comparable) converter.convert( maxStr, type ) : null );
        }
View Full Code Here

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.max()

            StatisticalFacet facet = searchResponse.facets().facet("stats1");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(2l));
            assertThat(facet.total(), equalTo(3d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(2d));
            assertThat(facet.mean(), equalTo(1.5d));
            assertThat(facet.sumOfSquares(), equalTo(5d));

            facet = searchResponse.facets().facet("stats2");
            assertThat(facet.name(), equalTo(facet.name()));
View Full Code Here

Examples of org.hibernate.validator.Length.max()

            formField.setMax(size.max());
        }
        if (field.getAnnotation(Length.class) != null) {
            Length length = field.getAnnotation(Length.class);
            formField.setMin(length.min());
            formField.setMax(length.max());
        }
        if (field.getAnnotation(Pattern.class) != null) {
            formField.setRegExp(field.getAnnotation(Pattern.class).regex());
        }
    }
View Full Code Here

Examples of org.hibernate.validator.Range.max()

            regexValidator.setPattern(pattern.regex());
            return regexValidator;
        } else if (annotationClass.equals(Range.class)) {
            Range range = (Range) annotation;
            LongRangeValidator longRangeValidator = new LongRangeValidator();
            longRangeValidator.setMaximum(range.max());
            longRangeValidator.setMinimum(range.min());
            LongRangeClientValidator longRangeClientValidator = new LongRangeClientValidator();
            longRangeClientValidator.setLongRangeValidator(longRangeValidator);
            return longRangeClientValidator;
        } else if (annotationClass.equals(Max.class)) {
View Full Code Here

Examples of org.hibernate.validator.Size.max()

            formField.setMin(1);
        }
        if (field.getAnnotation(Size.class) != null) {
            Size size = field.getAnnotation(Size.class);
            formField.setMin(size.min());
            formField.setMax(size.max());
        }
        if (field.getAnnotation(Length.class) != null) {
            Length length = field.getAnnotation(Length.class);
            formField.setMin(length.min());
            formField.setMax(length.max());
View Full Code Here

Examples of org.hibernate.validator.constraints.Length.max()

    // determine max length
    int maxlen = -1;
    final Length aLength = m.getAnnotation(Length.class);
    if(aLength != null) {
      maxlen = aLength.max();
    }
    else {
      // try Size anno
      final Size aSize = m.getAnnotation(Size.class);
      if(aSize != null) {
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.