Examples of Value


Examples of com.foundationdb.server.types.value.Value

            super(context, input);

            nfields = distinctType.nFields();
            currentValues = new Value[nfields];
            for (int i = 0; i < nfields; ++i) {
                currentValues[i] = new Value(distinctType.typeAt(i));
            }
        }
View Full Code Here

Examples of com.google.appengine.api.utils.SystemProperty.Environment.Value

      for (Map.Entry<String, String> header : headers.entrySet()) {
        builder.add(new HTTPHeader(header.getKey(), header.getValue()));
      }
    }
    RawGcsService rawGcsService;
    Value location = SystemProperty.environment.value();
    if (location == SystemProperty.Environment.Value.Production) {
      rawGcsService = OauthRawGcsServiceFactory.createOauthRawGcsService(builder.build());
    } else if (location == SystemProperty.Environment.Value.Development) {
      rawGcsService = LocalRawGcsServiceFactory.createLocalRawGcsService();
    } else {
View Full Code Here

Examples of com.google.clearsilver.jsilver.values.Value

  /**
   * @param args A local variable
   * @return Name (as string)
   */
  public Value execute(Value... args) {
    Value value = args[0];
    if (value instanceof VariableValue) {
      VariableValue variableValue = (VariableValue) value;
      Data variable = variableValue.getReference();
      if (variable != null) {
        return literalValue(variable.getSymlink().getName(), variableValue.getEscapeMode(),
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.Value

  // message Test {
  //   optional string name = 1 [(fileopt) = {}];
  // }
  @Test public void should_allow_empty_braces_as_value() {
    CustomFieldOption option = xtext.find("fileopt", ")", CustomFieldOption.class);
    Value value = option.getValue();
    ComplexValue complexValue = value instanceof ComplexValue ? (ComplexValue) value : null;
    assertTrue(complexValue != null && complexValue.getFields().isEmpty());
  }
View Full Code Here

Examples of com.google.enterprise.connector.spi.Value

            "values", "this is the text for field foo"));
    doc.crawlDoc = crawlDoc;
    doc.setMetaFields();
    Property p = doc.findProperty("foo");
    assertNotNull("property foo missing", p);
    Value v = p.nextValue();
    assertNotNull("property foo value missing", v);
    assertEquals("property foo", "this is the text for field foo",
        v.toString());
    assertNull(p.nextValue());
  }
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.Value

        window, methodName);
    if (functionObject == ScriptableObject.NOT_FOUND) {
      logger.log(TreeLogger.ERROR, "function " + methodName
          + " NOT FOUND, thisObj: " + jsThis + ", methodName: " + methodName);
      // TODO: see if this maps to QUIT
      return new ExceptionOrReturnValue(true, new Value(null));
    }
    Function jsFunction = (Function) functionObject;
    logger.log(TreeLogger.SPAM, "INVOKE: jsFunction: " + jsFunction);

    Object jsArgs[] = new Object[args.length];
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssProperty.Value

            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + VALUE_FUNCTION_NAME,
                null);
          }

          Value dotPathValue = params.get(0);
          String dotPath = maybeUnquote(((StringValue) dotPathValue).getValue());
          String suffix = params.size() == 3
              ? maybeUnquote(((StringValue) params.get(2)).getValue()) : "";

          return new DotPathValue(dotPath, suffix);
        } else if (value.getFunctionName().equals(LITERAL_FUNCTION_NAME)) {
          // This is a call to value()
          List<Value> params = new ArrayList<Value>();
          extractValueOf(params, value.getParameters());

          if (params.size() != 1) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + LITERAL_FUNCTION_NAME,
                null);
          }

          Value expression = params.get(0);
          if (!(expression instanceof StringValue)) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "The single argument to " + LITERAL_FUNCTION_NAME
                    + " must be a string value", null);
          }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssProperty.Value

            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + VALUE_FUNCTION_NAME,
                null);
          }

          Value dotPathValue = params.get(0);
          String dotPath = maybeUnquote(((StringValue) dotPathValue).getValue());
          String suffix = params.size() == 3
              ? maybeUnquote(((StringValue) params.get(2)).getValue()) : "";

          return new DotPathValue(dotPath, suffix);
        } else if (value.getFunctionName().equals(LITERAL_FUNCTION_NAME)) {
          // This is a call to value()
          List<Value> params = new ArrayList<Value>();
          extractValueOf(params, value.getParameters());

          if (params.size() != 1) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "Incorrect number of parameters to " + LITERAL_FUNCTION_NAME,
                null);
          }

          Value expression = params.get(0);
          if (!(expression instanceof StringValue)) {
            throw new CSSException(CSSException.SAC_SYNTAX_ERR,
                "The single argument to " + LITERAL_FUNCTION_NAME
                    + " must be a string value", null);
          }
View Full Code Here

Examples of com.google.visualization.datasource.datatable.value.Value

   * @return The input string builder.
   */
  static StringBuilder appendCellJson(TableCell cell,
      StringBuilder sb, boolean includeFormatting, boolean isLastColumn,
      boolean renderDateAsDateConstructor) {
    Value value = cell.getValue();
    ValueType type = cell.getType();
    StringBuilder valueJson = new StringBuilder();
    GregorianCalendar calendar;
    String escapedFormattedString = "";
    boolean isJsonNull = false;

    // Prepare a Json string representing the current value.
    DateValue dateValue;
    TimeOfDayValue timeOfDayValue;
    if ((value == null) || (value.isNull())) {
      valueJson.append("null");
      isJsonNull = true;
    } else {
      switch (type) {
        case BOOLEAN:
          valueJson.append(((BooleanValue) value).getValue());
          break;
        case DATE:
          valueJson.append("Date(");
          dateValue = (DateValue) value;
          valueJson.append(dateValue.getYear()).append(",");
          valueJson.append(dateValue.getMonth()).append(",");
          valueJson.append(dateValue.getDayOfMonth());
          valueJson.append(")");
          if (renderDateAsDateConstructor) {
            // Rendering date as a call to Date constructor, e.g new Date(2011,1,1)
            valueJson.insert(0, "new ");
          } else {
            // Rendering date in string format, e.g "Date(2011,1,1)"
            valueJson.insert(0, "\"");
            valueJson.append("\"");          
          }
          break;
        case NUMBER:
          valueJson.append(((NumberValue) value).getValue());
          break;
        case TEXT:
          valueJson.append("\"");
          valueJson.append(EscapeUtil.jsonEscape(value.toString()));
          valueJson.append("\"");
          break;
        case TIMEOFDAY:
          valueJson.append("[");
          timeOfDayValue = (TimeOfDayValue) value;
          valueJson.append(timeOfDayValue.getHours()).append(",");
          valueJson.append(timeOfDayValue.getMinutes()).append(",");
          valueJson.append(timeOfDayValue.getSeconds()).append(",");
          valueJson.append(timeOfDayValue.getMilliseconds());
          valueJson.append("]");
          break;
        case DATETIME:
          calendar = ((DateTimeValue) value).getCalendar();
          valueJson.append("Date(");
          valueJson.append(calendar.get(GregorianCalendar.YEAR)).append(",");
          valueJson.append(calendar.get(GregorianCalendar.MONTH)).append(",");
          valueJson.append(calendar.get(GregorianCalendar.DAY_OF_MONTH));
          valueJson.append(",");
          valueJson.append(calendar.get(GregorianCalendar.HOUR_OF_DAY));
          valueJson.append(",");
          valueJson.append(calendar.get(GregorianCalendar.MINUTE)).append(",");
          valueJson.append(calendar.get(GregorianCalendar.SECOND));
          valueJson.append(")");
          if (renderDateAsDateConstructor) {
            // Rendering date as a call to Date constructor, e.g new Date(2011,1,1,0,0,0)
            valueJson.insert(0, "new ");
          } else {
            // Rendering date in string format, e.g "Date(2011,1,1,0,0,0)"
            valueJson.insert(0, "\"");
            valueJson.append("\"");          
          }
          break;
        default:
          throw new IllegalArgumentException("Illegal value Type " + type);
      }
    }

    // Prepare an escaped string representing the current formatted value.
    String formattedValue = cell.getFormattedValue();
    if ((value != null) && !value.isNull() && (formattedValue != null)) {
      escapedFormattedString = EscapeUtil.jsonEscape(formattedValue);
      // Check for a value of type TEXT if the formatted value equals
      // its ordinary toString.
      if ((type == ValueType.TEXT) && value.toString().equals(formattedValue)) {
        escapedFormattedString = "";
      }
    }

    // Add a Json for this cell. And,
View Full Code Here

Examples of com.hazelcast.query.SampleObjects.Value

    public void testAndPredicate_whenFirstIndexAwarePredicateIsNotIndexed() throws Exception {
        final HazelcastInstance instance = createHazelcastInstance();
        final IMap<Object, Object> map = instance.getMap("map");
        map.addIndex("name", false);
        String name = randomString();
        map.put("key", new Value(name));

        final ShouldExecuteOncePredicate indexAwareNotIndexedPredicate = new ShouldExecuteOncePredicate();
        final EqualPredicate equalPredicate = new EqualPredicate("name", name);
        final AndPredicate andPredicate = new AndPredicate(indexAwareNotIndexedPredicate, equalPredicate);
        map.values(andPredicate);
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.