Examples of Pair


Examples of org.eclipse.imp.utils.Pair

        for (String pack : usages.keySet())
        {
            for (NodeLink info : usages.get(pack))
            {
                HaxeTree node = info.getNode();
                Pair pair = null;
                if (node instanceof Usage || node instanceof Declaration)
                {
                    pair = new Pair(
                            node.getToken().getStartIndex(),
                            node.getToken().getStopIndex() - node.getToken().getStartIndex() + 1);
                }
                targets.put(pack, pair);
            }
View Full Code Here

Examples of org.eigenbase.util.Pair

            sortRel);
        relToHiveRR.put(sortRel, outputRR);
        relToHiveColNameOptiqPosMap.put(sortRel, hiveColNameOptiqPosMap);
      }

      return (new Pair(sortRel, originalOBChild));
    }
View Full Code Here

Examples of org.geotools.data.complex.PathAttributeList.Pair

            final Expression sourceExpression = attMapping.getIdentifierExpression();
           
            List<Pair> ls = elements.get(attMapping.getParentLabel());
            if (ls != null) {
                for (int i = 0; i < ls.size(); i++) {
                    Pair parentAttribute = ls.get(i);                   
                    String instancePath = attMapping.getInstanceXpath();                   
                    int count = 1;
                    String countXpath = parentAttribute.getXpath();
                    // if instance path not set, then element exists, with one instance
                    if (instancePath != null) {
                        countXpath = countXpath + XPATH_SEPARATOR + instancePath;
                    }

                    for (int j = 0; j < count; j++) {
                        final String bracketIndex = "";
                        String xpath;
                        if (instancePath == null) {
                            xpath = parentAttribute.getXpath() + XPATH_SEPARATOR
                                    + sourceExpression.toString();
                        } else {
                            xpath = parentAttribute.getXpath() + XPATH_SEPARATOR
                                    + instancePath + bracketIndex
                                    + XPATH_SEPARATOR + sourceExpression.toString();
                        }
                        String label = getFullQueryPath(attMapping);
View Full Code Here

Examples of org.jaudiotagger.tag.datatype.Pair

                dos.writeLong(trackData.getDateAdded());
                dos.writeLong(trackData.getLastModified());

                meta.clear();
                if (!Util.isEmpty(trackData.getCodec()))
                    meta.add(new Pair(META_KEY_CODEC, trackData.getCodec()));

                if (!Util.isEmpty(trackData.getEncoder())) {
                  meta.add(new Pair(META_KEY_ENCODER, trackData.getEncoder()));
                }
                Iterator<Entry<FieldKey, FieldValues>> fields = trackData.getAllTagFieldValuesIterator();
                if (fields != null) {
                  while (fields.hasNext()) {
                    Entry<FieldKey, FieldValues> field = fields.next();
                for (int i = 0; i < field.getValue().size(); i++) {
                  String value = field.getValue().get(i);
                        meta.add(new Pair(field.getKey().toString(), value));
                      }
                  }
                }

                dos.writeInt(meta.size());
View Full Code Here

Examples of org.javatuples.Pair

        this.setProperty(Constants.GREMLIN_GIRAPH_OUTPUT_LOCATION, outputLocation);
    }

    @Override
    public Iterator iterator() {
        return StreamFactory.stream(this.getKeys()).map(k -> new Pair(k, this.getProperty(k))).iterator();
    }
View Full Code Here

Examples of org.javatuples.Pair

    @Override
    public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise) throws Exception {
        if (msg instanceof Pair) {
            try {
                final Pair pair = (Pair) msg;
                final Iterator itty = (Iterator) pair.getValue1();
                final RequestMessage requestMessage = (RequestMessage) pair.getValue0();

                // the batch size can be overriden by the request
                final int resultIterationBatchSize = (Integer) requestMessage.optionalArgs(Tokens.ARGS_BATCH_SIZE).orElse(settings.resultIterationBatchSize);

                // timer for the total serialization time
View Full Code Here

Examples of org.jinq.tuples.Pair

   private T createTuple(Object[] data)
   {
      switch(subreaders.length)
      {
         case 2:
            return (T)new Pair(data[0], data[1]);
         case 3:
            return (T)new Tuple3(data[0], data[1], data[2]);
         case 4:
            return (T)new Tuple4(data[0], data[1], data[2], data[3]);
         case 5:
View Full Code Here

Examples of org.jostraca.util.Pair

  // test methods

  public void testHasValue() throws Exception {
    String a = "a";
    String b = "b";
    Pair p = new Pair( "a", "b" );
    assertEquals( "a", p.getFirst() );
    assertEquals( "b", p.getSecond() );
  }
View Full Code Here

Examples of org.netbeans.modules.php.api.util.Pair

          String text = token2.text().toString();
          //for comletion of end macros (preparation)
          if(token2.id() == LatteTokenId.MACRO && paired.containsKey(text)) {
            Pair<LatteMacro, Integer> p = paired.get(text);
            Pair newP;
            Integer i;
            if(!isEndMacro) {
              // increment with open pair macro
              i = (p.second == null ? 1 : p.second + 1);
              newP = Pair.of(p.first, i);
View Full Code Here

Examples of org.nodes.util.Pair

    List<DTNode<StringLabel,StringLabel>> commonChilds = new ArrayList<DTNode<StringLabel,StringLabel>>();

    Set<Pair> childsA = new TreeSet<Pair>();
    Set<Pair> childsB = new TreeSet<Pair>();
    Map<Pair, DTNode<StringLabel,StringLabel>> pairMap = new TreeMap<Pair, DTNode<StringLabel,StringLabel>>();
    Pair pair;

    // We need common edge label pairs to find common children
    for (DTLink<StringLabel,StringLabel> edge : rootA.linksOut()) {
      pair = new Pair(Integer.parseInt(edge.tag().toString()), Integer.parseInt(edge.to().label().toString()));
      childsA.add(pair);
      pairMap.put(pair, edge.to());
    }

    for (DTLink<StringLabel,StringLabel> edge : rootB.linksOut()) {
      pair = new Pair(Integer.parseInt(edge.tag().toString()), Integer.parseInt(edge.to().label().toString()));
      childsB.add(pair);
      pairMap.put(pair, edge.to());
    }

    // If root nodes have an equivalence like relation
    for (Pair childA : childsA) {
      if (childA.getSecond() == Integer.parseInt(rootB.label().toString()) && childsB.contains(new Pair(childA.getFirst(), Integer.parseInt(rootA.label().toString())))) {
        commonChilds.add(null);
      }
    }

    childsA.retainAll(childsB); // intersect the sets
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.