Examples of asDouble()


Examples of com.workingdogs.village.Value.asDouble()

                    if (value.isBytes()) obj2 = value.asBytes();
                    if (value.isDate()) obj2 = value.asDate();
                    if (value.isShort()) obj2 = new Short(value.asShort());
                    if (value.isInt()) obj2 = new Integer(value.asInt());
                    if (value.isLong()) obj2 = new Long(value.asLong());
                    if (value.isDouble()) obj2 = new Double(value.asDouble());
                    if (value.isFloat()) obj2 = new Float(value.asFloat());
                    if (value.isBoolean()) obj2 = new Boolean(value.asBoolean());
                    if (value.isString()) obj2 = value.asString();
                    if (value.isTime()) obj2 = value.asTime();
                    if (value.isTimestamp()) obj2 = value.asTimestamp();
View Full Code Here

Examples of fraction.Fraction.asDouble()

      tests="double asDouble()",
      description="asDouble()-metoden returnerer brøken som et desimaltall (returverdi av type double)."
      )
  public void testAsDouble() {
    Fraction fraction = new Fraction(1, 8);
    Assert.assertEquals(1.0/8.0, fraction.asDouble());
  }

  @JExercise(
      tests="private boolean simplify()",
      description="Når vi utfører en regneoperasjon med 2 brøker, får vi ofte en brøk som kan forenkles." +
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.asDouble()

        dB.report(scriptEntry, getName(), amountElement.debug()
                                          + aH.debugList("entities", entities)
                                          + (source == null ? "" : source.debug()));

        double amount = amountElement.asDouble();
        for (dEntity entity : entities) {
            if (entity.getLivingEntity() == null) {
                dB.echoDebug(scriptEntry, entity + " is not a living entity!");
                continue;
            }
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.asDouble()

                        : aH.debugObj("Action", "STOP"))
                        + (lead != null ? aH.debugObj("Lead", lead.toString()) : "")
                        + target.debug());

        if (lead != null)
            ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getNavigator().getLocalParameters().distanceMargin(lead.asDouble());

        if (stop != null)
            ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getNavigator()
                    .cancelNavigation();
        else
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.asDouble()

        if (entities == null)
            return;
        Element amountelement = scriptEntry.getElement("amount");

        dB.report(scriptEntry, getName(), amountelement.debug() + aH.debugObj("entities", entities));
        if (amountelement.asDouble() == -1)
            for (dEntity entity : entities)
                entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
        else {
            double amount = amountelement.asDouble();
            for (dEntity entity : entities)
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.asDouble()

        dB.report(scriptEntry, getName(), amountelement.debug() + aH.debugObj("entities", entities));
        if (amountelement.asDouble() == -1)
            for (dEntity entity : entities)
                entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
        else {
            double amount = amountelement.asDouble();
            for (dEntity entity : entities)
                if (entity.getLivingEntity().getHealth() + amount < entity.getLivingEntity().getMaxHealth())
                    entity.getLivingEntity().setHealth(entity.getLivingEntity().getHealth() + amount);
                else
                    entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("decimal"));
        assertThat(property.getXIsisFormat(), is("double"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isDouble(), is(true));
        Double doubleValue = scalarRepr.asDouble();
        assertThat(doubleValue, is(12345678901234567890.1234567890));
       
       
        // and then member types have links to details (selected ones inspected only)
        property = domainObjectRepr.getProperty("booleanProperty");
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("decimal"));
        assertThat(property.getXIsisFormat(), is("double"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isDouble(), is(true));
        Double doubleValue = scalarRepr.asDouble();
        assertThat(doubleValue, is(12345678901234567890.1234567890));
       


        // and then member types have links to details (selected ones inspected only)
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("decimal"));
        assertThat(property.getXIsisFormat(), is("double"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isDouble(), is(true));
        Double doubleValue = scalarRepr.asDouble();
        assertThat(doubleValue, is(12345678901234567890.1234567890));
       
       
        // and then member types have links to details (selected ones inspected only)
        property = domainObjectRepr.getProperty("booleanProperty");
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("decimal"));
        assertThat(property.getXIsisFormat(), is("double"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isDouble(), is(true));
        Double doubleValue = scalarRepr.asDouble();
        assertThat(doubleValue, is(12345678901234567890.1234567890));
       
       
        // and then member types have links to details (selected ones inspected only)
        property = domainObjectRepr.getProperty("booleanProperty");
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.