Examples of valueOf()


Examples of joptsimple.OptionSet.valueOf()

                String storeName = (String) options.valueOf("store");
                String quotaValue = (String) options.valueOf("quota-value");
                executeSetQuota(adminClient, storeName, quotaType, quotaValue);

            } else if(options.has("unset-quota")) {
                String quotaType = (String) options.valueOf("unset-quota");
                Set<String> validQuotaTypes = QuotaUtils.validQuotaTypes();
                if(!validQuotaTypes.contains(quotaType)) {
                    Utils.croak("Specify a valid quota type from :" + validQuotaTypes);
                }
                if(!options.has("store")) {
View Full Code Here

Examples of kodkod.engine.satlab.SATSolver.valueOf()

          final Solution sol = Solution.satisfiable(stats, padInstance(translation.interpret(), bounds));
          // add the negation of the current model to the solver
          final int primary = translation.numPrimaryVariables();
          final int[] notModel = new int[primary];
          for(int i = 1; i <= primary; i++) {
            notModel[i-1] = cnf.valueOf(i) ? -i : i;
          }
          cnf.addClause(notModel);
          return sol;
        } else {
          formula = null; bounds = null; // unsat, no more solutions, free up some space
View Full Code Here

Examples of net.fortytwo.ripple.model.ModelConnection.valueOf()

                assertTrue(found);
            }
        };

        RippleValue l1 = mc.valueOf("1", XMLSchema.STRING);
        RippleValue l2 = mc.valueOf("2", XMLSchema.STRING);
        RippleValue l1a = mc.valueOf("1a", XMLSchema.STRING);
        RippleValue l1b = mc.valueOf("1b", XMLSchema.STRING);
        RippleValue l2a = mc.valueOf("2a", XMLSchema.STRING);
        RippleValue l2b = mc.valueOf("2b", XMLSchema.STRING);
View Full Code Here

Examples of net.thucydides.core.csv.converters.TypeConverter.valueOf()

        }
    }

    private boolean setViaField(Field field, String value) throws IllegalAccessException {
        TypeConverter converter = TypeConverters.getTypeConverterFor(field.getType());
        Object valueToSet = converter.valueOf(value);
        field.set(targetObject, valueToSet);
        return true;
    }

    private boolean setViaSetter(Method setter, String value) throws InvocationTargetException, IllegalAccessException {
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.valueOf()

    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
    assertEquals(xpath.selectSingleNode("ancestor::*", feed.getEntries().get(0)), feed);
    assertEquals(xpath.valueOf("concat('The feed is is ',/a:feed/a:id)", feed), "The feed is is urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6");
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.valueOf()

    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
    assertEquals(xpath.selectSingleNode("ancestor::*", feed.getEntries().get(0)), feed);
    assertEquals(xpath.valueOf("concat('The feed is is ',/a:feed/a:id)", feed), "The feed is is urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6");
   
  }
 
  public void testUriNormalization() throws Exception {
    String s1 = "HTTP://www.Example.ORG:80/./foo/%2d/../%2d/./foo";
View Full Code Here

Examples of org.apache.mahout.classifier.df.data.Dataset.valueOf()

    DecisionForest forest = buildForest(datas);
    // Test data
    Dataset dataset = datas[0].getDataset();
    Data testData = DataLoader.loadData(dataset, TEST_DATA);

    double noValue = dataset.valueOf(4, "no");
    double yesValue = dataset.valueOf(4, "yes");
    assertEquals(noValue, forest.classify(testData.getDataset(), rng, testData.get(0)), EPSILON);
    // This one is tie-broken -- 1 is OK too
    //assertEquals(yesValue, forest.classify(testData.getDataset(), rng, testData.get(1)), EPSILON);
    assertEquals(noValue, forest.classify(testData.getDataset(), rng, testData.get(2)), EPSILON);
View Full Code Here

Examples of org.data2semantics.platform.core.data.CommandLineType.valueOf()

   * @return
   */
  private Object castOutputType(InstanceOutput output, String stringValue) {
    CommandLineType type = (CommandLineType) output.dataType();
   
    return type.valueOf(stringValue);
  }

  @Override
  public boolean typeMatches(Output output, Input input) {
    DataType outputType = output.dataType();
View Full Code Here

Examples of org.dom4j.Document.valueOf()

            if (messagesXML == null) {
                throw new IllegalArgumentException(
                        "plugin doesn't contain a messages.xml file");
            }
            Document pluginDocument = parseDocument(zip.getInputStream(findbugsXML));
            String pluginId = pluginDocument.valueOf(XPATH_PLUGIN_PLUGINID).trim();
            String provider = pluginDocument.valueOf(XPATH_PLUGIN_PROVIDER).trim();
            String website = pluginDocument.valueOf(XPATH_PLUGIN_WEBSITE).trim();
            List<Document> msgDocuments = new ArrayList<Document>(3);
            for (String msgFile : getPotentialMessageFiles()) {
                ZipEntry msgEntry = zip.getEntry(msgFile);
View Full Code Here

Examples of org.dom4j.Element.valueOf()

      Element field = (Element) iter.next();
      String fieldName, storedS, indexedS, tokenizedS, boostS, fieldText;
      boolean stored, tokenized, indexed;
      float boost = 1;

      fieldName = field.valueOf("@name");
      if (fieldName.equals("")) {
        throw new IllegalDocumentException("Field without name.");
      }

      //There cannot be a field with the name used to store the documentId (docIdName)
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.