Examples of asBoolean()


Examples of cambridge.model.Expression.asBoolean()

   public void testBoolean() {
      String expression = "true || false";
      try {
         Expression e = Expressions.parse(expression, 0, 0);
         //assertEquals("Testing type", CambridgeExpression.Type.Boolean, e.getType(bindings));
         assertTrue(e.asBoolean(bindings));
      } catch (ExpressionParsingException e) {
         e.printStackTrace();
      } catch (ExpressionEvaluationException e) {
         e.printStackTrace();
      }
View Full Code Here

Examples of com.barchart.feed.base.values.api.BooleanValue.asBoolean()

  @Override
  public final boolean equals(Object that) {
    if (that instanceof BooleanValue) {
      BooleanValue thatBool = (BooleanValue) that;
      return this.asBoolean() == thatBool.asBoolean();
    }
    return false;
  }

  @Override
View Full Code Here

Examples of com.eclipsesource.json.JsonValue.asBoolean()

    }

    public static boolean getBoolean(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asBoolean();
    }

    public static boolean getBoolean(JsonObject object, String field, boolean defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.asBoolean()

                    child.remove();
                }
                if (value.isNull()) {
                    tree.removeProperty(name);
                } else if (value.isBoolean()) {
                    tree.setProperty(name, value.asBoolean());
                } else if (value.isLong()) {
                    tree.setProperty(name, value.asLong());
                } else if (value.isDouble()) {
                    tree.setProperty(name, value.asDouble());
                } else if (value.isBigDecimal()) {
View Full Code Here

Examples of com.google.clearsilver.jsilver.values.Value.asBoolean()

*/
public class NotFunction extends NonEscapingFunction {

  public Value execute(Value... args) {
    Value value = args[0];
    return literalConstant(!value.asBoolean(), value);
  }

}
View Full Code Here

Examples of com.google.enterprise.connector.dctm.dfcwrap.IValue.asBoolean()

    for (int i = 0, n = object.getValueCount(name); i < n; i++) {
      IValue val = object.getRepeatingValue(name, i);
      try {
        switch (dataType) {
          case IAttr.DM_BOOLEAN:
            values.add(Value.getBooleanValue(val.asBoolean()));
            break;
          case IAttr.DM_DOUBLE:
            values.add(Value.getDoubleValue(val.asDouble()));
            break;
          case IAttr.DM_ID:
View Full Code Here

Examples of com.hazelcast.com.eclipsesource.json.JsonValue.asBoolean()

    }

    public static boolean getBoolean(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asBoolean();
    }

    public static boolean getBoolean(JsonObject object, String field, boolean defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
View Full Code Here

Examples of com.icl.saxon.expr.Value.asBoolean()

            if (value == null)
            {
                return false;
            }

            return value.asBoolean();
        }
        catch (final Exception e)
        {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Failed to evaluate '" + str + "'", e);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asBoolean()

//          data.getMap(data);
         
          if ((osd = map.get("login")) !=null)
          {
            boolean loginSuccess = osd.asBoolean();
            boolean redirect = (osd.asString().equals("indeterminate"));

            if (redirect)
            {
              // Login redirected
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSDBoolean.asBoolean()

    Assert.assertTrue(theSD instanceof OSDArray);
    array = (OSDArray)theSD;

    Assert.assertEquals(OSDType.Boolean, array.get(0).getType());
    tempBool = (OSDBoolean)array.get(0);
    Assert.assertEquals(true, tempBool.asBoolean());

    Assert.assertEquals(OSDType.Boolean, array.get(1).getType());
    tempBool = (OSDBoolean)array.get(1);
    Assert.assertEquals(true, tempBool.asBoolean());
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.