Examples of DecimalType


Examples of br.net.woodstock.rockframework.web.common.types.DecimalType

    super(format);
  }

  @Override
  protected DecimalType wrap(final Number n) {
    return new DecimalType(Double.valueOf(n.longValue()));
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.web.types.DecimalType

    super(format);
  }

  @Override
  protected DecimalType wrap(final Number n) {
    return new DecimalType(Double.valueOf(n.longValue()));
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.web.types.DecimalType

    super(format);
  }

  @Override
  protected DecimalType wrap(final Number n) {
    return new DecimalType(Double.valueOf(n.longValue()));
  }
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.DecimalType

            .add(null, "TYPE_INT", PropertyTypeKind.INT)
            .add(null, "TYPE_LONG", PropertyTypeKind.LONG)
            .add(null, "TYPE_DATE", PropertyTypeKind.DATE)
            .add(null, "TYPE_DATETIME", PropertyTypeKind.DATETIME)
            .add(null, "TYPE_TEXT", new StringType(255))
            .add(null, "TYPE_DECIMAL", new DecimalType(10, 10))
            .toDescription();
        emitDmdl(RecordModelGenerator.generate(table));

        ModelLoader loader = generateJava();
        loader.setNamespace(Constants.SOURCE_TABLE);
View Full Code Here

Examples of com.asakusafw.dmdl.thundergate.model.DecimalType

                }

                Attribute[] attributes = attributeList.toArray(new Attribute[attributeList.size()]);
                switch (propertyType) {
                case BIG_DECIMAL:
                    DecimalType decimalType = new DecimalType(numericPrecision, numericScale);
                    builder.add(columnComment, columnName, decimalType, attributes);
                    break;
                case STRING:
                    StringType stringType = new StringType((int) characterMaximumLength);
                    builder.add(columnComment, columnName, stringType, attributes);
View Full Code Here

Examples of com.asakusafw.modelgen.model.DecimalType

                }

                Attribute[] attributes = attributeList.toArray(new Attribute[attributeList.size()]);
                switch (propertyType) {
                case BIG_DECIMAL:
                    DecimalType decimalType = new DecimalType(numericPrecision, numericScale);
                    builder.add(columnComment, columnName, decimalType, attributes);
                    break;
                case STRING:
                    StringType stringType = new StringType((int) characterMaximumLength);
                    builder.add(columnComment, columnName, stringType, attributes);
View Full Code Here

Examples of org.openhab.core.library.types.DecimalType

      maxValue = BigDecimal.valueOf(100);
    }

    // if the current state is a valid value, we calculate the up and down step values
    if(state instanceof DecimalType) {
      DecimalType actState = (DecimalType) state;
      BigDecimal newLower = actState.toBigDecimal().subtract(step);
      BigDecimal newHigher = actState.toBigDecimal().add(step);
      if(newLower.compareTo(minValue) < 0) {
        newLower = minValue;
      }
      if(newHigher.compareTo(maxValue) > 0) {
        newHigher = maxValue;
View Full Code Here

Examples of org.openhab.core.library.types.DecimalType

          return new Date(year-1900, 0, 1);
        }
       
        @Override
        public State getState() {
          return new DecimalType(year);
        }
       
        @Override
        public String getName() {
          return "Test";
View Full Code Here

Examples of org.openhab.core.library.types.DecimalType

    assertEquals("2000", historicItem.getState().toString());
  }

  @Test
  public void testMinimumSince() {
    item.setState(new DecimalType(5000));
    HistoricItem historicItem = PersistenceExtensions.minimumSince(item, new DateMidnight(1940, 1, 1), "test");
    assertNotNull(historicItem);
    assertEquals("5000", historicItem.getState().toString());
   
    historicItem = PersistenceExtensions.minimumSince(item, new DateMidnight(2005, 1, 1), "test");
View Full Code Here

Examples of org.openhab.core.library.types.DecimalType

    assertEquals(new DateMidnight(2005, 1, 1).toDate(), historicItem.getTimestamp());
  }

  @Test
  public void testMaximumSince() {
    item.setState(new DecimalType(1));
    HistoricItem historicItem = PersistenceExtensions.maximumSince(item, new DateMidnight(2012, 1, 1), "test");
    assertNotNull(historicItem);
    assertEquals("1", historicItem.getState().toString());
   
    historicItem = PersistenceExtensions.maximumSince(item, new DateMidnight(2005, 1, 1), "test");
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.