Examples of asInt()


Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asInt()

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
        assertThat(property.getXIsisFormat(), is("int"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isInt(), is(true));
        Integer intValue = scalarRepr.asInt();
        assertThat(intValue, is(987654321));

        property = domainObjectRepr.getProperty("longProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asInt()

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
        assertThat(property.getXIsisFormat(), is("int"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isInt(), is(true));
        Integer intValue = scalarRepr.asInt();
        assertThat(intValue, is(987654321));

        property = domainObjectRepr.getProperty("longProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asInt()

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
        assertThat(property.getXIsisFormat(), is("int"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isInt(), is(true));
        Integer intValue = scalarRepr.asInt();
        assertThat(intValue, is(987654321));

        property = domainObjectRepr.getProperty("longProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asInt()

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
        assertThat(property.getXIsisFormat(), is("int"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isInt(), is(true));
        Integer intValue = scalarRepr.asInt();
        assertThat(intValue, is(987654321));

        property = domainObjectRepr.getProperty("longProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("int"));
View Full Code Here

Examples of org.codehaus.jackson.JsonNode.asInt()

  @Override
  Integer parse() throws ParseException {
    final JsonNode value = node.path(LEVEL_PROPERTY);
    if (value.isInt()) {
      return value.asInt();
    }
    throw new ParseException("Invalid property '" + LEVEL_PROPERTY + "': value is not an integer");
  }

}
View Full Code Here

Examples of org.codehaus.jackson.JsonNode.asInt()

    for (int i = 0; i < 2; i++) {
      e = it.next();
      if (!e.isInt()) {
        throw new ParseException("Invalid property '" + RANGE_PROPERTY + "': range value is not an integer");
      }
      range[i] = e.asInt();
    }

    return range;
  }
View Full Code Here

Examples of org.codehaus.jam.JAnnotationValue.asInt()

                if (size == null) {
                    out.println("bs.writeBoolean(" + getter + "!=null);");
                    out.println("    rc += " + getter + "==null ? 0 : " + getter + ".Length+4;");
                }
                else {
                    baseSize += size.asInt();
                }
            }
            else if (propertyType.isArrayType()) {
                if (size != null) {
                    out.println("rc += marshalObjectArrayConstSize(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
View Full Code Here

Examples of org.dashbuilder.dataset.sort.SortOrder.asInt()

        for (int i=0; i<columns.size(); i++) {
            DataColumn column = columns.get(i);
            SortOrder order = orders.get(i);
            Comparable value1 = (Comparable) column.getValues().get(row1);
            Comparable value2 = (Comparable) column.getValues().get(row2);
            int comp = ComparatorUtils.compare(value1, value2, order.asInt());
            if (comp != 0) return comp;
        }
        return 0;
    }
}
View Full Code Here

Examples of org.ethereum.util.Value.asInt()

  public void testTypes() {
    Value str = new Value("str");
    assertEquals(str.asString(), "str");

    Value num = new Value(1);
    assertEquals(num.asInt(), 1);

    Value inter = new Value(new Object[]{1});
    Object[] interExp = new Object[]{1};
    assertTrue(new Value(inter.asObj()).cmp(new Value(interExp)));
View Full Code Here

Examples of org.jboss.dmr.ModelNode.asInt()

            interfaceAdd.get(OP).set(ADD);

            final ModelNode criteriaNode = interfaceAdd.get(CRITERIA);
            parseInterfaceCriteria(reader, criteriaNode);

            if (criteriaNode.getType() != ModelType.STRING && criteriaNode.asInt() == 0 && checkSpecified) {
                throw unexpectedEndElement(reader);
            }
            list.add(interfaceAdd);
        }
    }
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.