Examples of integer()


Examples of com.blogger.tcuri.appserver.validator.Validators.integer()

    @Override
    public Resolution execute(ActionContext context) throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();

        Validators v = new Validators();
        v.add("arg1", v.required(), v.integer());
        v.add("arg2", v.required(), v.integer());
        if (v.isError()) {
            map.put("message", v.getErrorMap());
            return new JsonResolution(map);
        }
View Full Code Here

Examples of com.boundlessgeo.geoserver.json.JSONObj.integer()

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
        assertEquals("foo", obj.str("name"));
        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.bool("default"));

        assertEquals(0, obj.integer("maps").intValue());
        assertEquals(1, obj.integer("layers").intValue());
        assertEquals(0, obj.integer("stores").intValue());

        result = mvc.perform(get("/api/workspaces/bar"))
                .andExpect(status().isOk())
View Full Code Here

Examples of javax.validation.constraints.DecimalMax.integer()

            DecimalMaxFacet facet = new DecimalMaxFacet(a.value(), a.inclusive());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Digits.class)) {
            Digits a = (Digits) helper.getAnnotation(element, Digits.class);
            DigitsFacet facet = new DigitsFacet(a.integer(), a.fraction());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Max.class)) {
            Max a = (Max) helper.getAnnotation(element, Max.class);
            MaxFacet facet = new MaxFacet(a.value());
View Full Code Here

Examples of javax.validation.constraints.DecimalMin.integer()

            DecimalMaxFacet facet = new DecimalMaxFacet(a.value(), a.inclusive());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Digits.class)) {
            Digits a = (Digits) helper.getAnnotation(element, Digits.class);
            DigitsFacet facet = new DigitsFacet(a.integer(), a.fraction());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Max.class)) {
            Max a = (Max) helper.getAnnotation(element, Max.class);
            MaxFacet facet = new MaxFacet(a.value());
View Full Code Here

Examples of javax.validation.constraints.Digits.integer()

            // String byte, short, int, long, and their respective wrapper types
            // null elements are considered valid
            Digits digits = (Digits) annotation;
            if (digits.fraction() == 0) {
                sb.append("digits: true, \n");
                sb.append("maxlength: ").append(digits.integer());
            } else {
                // Something like /^\d{1,5}(\.\d{1,2})?$/
                sb.append("pattern: /^\\d{1,").append(digits.integer()).append("}(\\.\\d{1,").append(digits.fraction()).append("})?$/ ");
            }
        } else if (annotation instanceof Digits.List) {
View Full Code Here

Examples of kodkod.engine.bool.BooleanFactory.integer()

    switch(castExpr.op()) {
    case INTCAST :  
      for(IntIterator iter = ints.iterator(); iter.hasNext(); ) {
        int i = iter.next();
        int atomIndex = interpreter.interpret(i);
        ret.set(atomIndex, factory.or(ret.get(atomIndex), child.eq(factory.integer(i))));
      }
      break;
    case BITSETCAST :
      final List<BooleanValue> twosComplement = child.twosComplementBits();
      final int msb = twosComplement.size()-1;
View Full Code Here

Examples of org.apache.drill.exec.vector.complex.writer.BaseWriter.ListWriter.integer()

      MapWriter map = writer.rootAsMap();
      ListWriter list = map.list("a");
      list.start();

      ListWriter innerList = list.list();
      IntWriter innerInt = innerList.integer();

      innerList.start();

      IntHolder holder = new IntHolder();
View Full Code Here

Examples of org.apache.drill.exec.vector.complex.writer.BaseWriter.MapWriter.integer()

      innerInt.write(holder);

      innerList.end();
      list.end();

      IntWriter numCol = map.integer("nums");
      holder.value = 14;
      numCol.write(holder);

      MapWriter repeatedMap = map.list("b").map();
      repeatedMap.start();
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.integer()

    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
      return makeResult(intTuple, vf.tuple(vf.integer(tupleA), vf.integer(tupleB)), ctx);
    }
    throw new RuntimeException("A case not handled? " + name);
  }

  @Override
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.integer()

    }
    if (intResult != null) {
      return makeResult(tf.integerType(), vf.integer(intResult), ctx);
    }
    if (tupleA != null && tupleB != null) {
      return makeResult(intTuple, vf.tuple(vf.integer(tupleA), vf.integer(tupleB)), ctx);
    }
    throw new RuntimeException("A case not handled? " + name);
  }

  @Override
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.