Examples of Pair


Examples of com.intel.hadoop.graphbuilder.util.Pair

  @Override
  public Pair<T1, T2> next() {
    int i = cur;
    cur++;
    return new Pair(list1.get(i), list2.get(i));
  }
View Full Code Here

Examples of com.intellij.openapi.util.Pair

  public void add(JComponent leftComponent, JComponent rightComponent) {
    add(leftComponent, rightComponent, false);
  }

  public void add(JComponent leftComponent, JComponent rightComponent, boolean indented) {
    myOptions.add(new Pair(leftComponent, rightComponent));
    myIsShifted.add(Boolean.valueOf(indented));
  }
View Full Code Here

Examples of com.metamx.common.Pair

    for (AggregatorFactory aggregatorSpec : aggList) {
      if (dependencySet.contains(aggregatorSpec.getName())) {
        condensedAggs.add(aggregatorSpec);
      }
    }
    return new Pair(condensedAggs, condensedPostAggs);
  }
View Full Code Here

Examples of com.numb3r3.common.Pair

        return new InMemoryJBlasMatrix(DoubleMatrix.eye(n), null);
    }

    @Override
    public Pair getDims() {
        return new Pair(this.getRowsNum(), this.getColumnsNum());
    }
View Full Code Here

Examples of com.opengamma.util.tuple.Pair

   */
  @SuppressWarnings({"unchecked", "rawtypes" })
  public Map getMap() {
    Map map = new LinkedHashMap();
    for (Object obj : getPairs()) {
      Pair pair = (Pair) obj;
      map.put(pair.getFirst(), pair.getSecond());
    }
    return map;
  }
View Full Code Here

Examples of com.poker.analyst.combination.Pair

   
    return combinationList.size() == 0 ? null : combinationList;
  }
 
  public static List<Pair> analysePair(Set<Card> allCards, PlayingCards plCards){
    Pair      pair    = null;
    List<Pair>     pairs     = null;         
           
   
    int count      = 0;
    int i = 0;
   
    CardFace cardFace = null;
   
    for (Card card: allCards){
      i++;
      if (card.getFace().equals(cardFace))       
        count++;
      else{
        if (count == 2){
          if (pairs == null) pairs = new ArrayList<Pair>();
          pair = new Pair();
          pair.setCombinationList(getListOfCardsByFace(allCards,cardFace));
          pairs.add(pair);
        }
        cardFace = card.getFace();
        count = 1;
      }       
    }   
    if (count == 2){
      if (pairs == null) pairs = new ArrayList<Pair>();
      pair = new Pair();
      pair.setCombinationList(getListOfCardsByFace(allCards,cardFace));
      pairs.add(pair);
    }
   
    return pairs;
 
View Full Code Here

Examples of com.streamreduce.util.Pair

        metricCriteria.put("RESOURCE_ID", "DiskReadBytes");
        metricCriteria.put("METRIC_ID", "average");

        NodebellyMessageTransformer transformer = setupTransformer();

        Pair pair = transformer.getUnitsLabel("INVENTORY_ITEM_RESOURCE_USAGE", metricCriteria, 1065.0, true);
        //System.out.println(pair.first + " " + pair.second);
        assert(((String)pair.second).startsWith(" "));
        assert(((String)pair.second).endsWith("Kb"));

        pair = transformer.getUnitsLabel("INVENTORY_ITEM_RESOURCE_USAGE", metricCriteria, 234234235.0, false);
View Full Code Here

Examples of com.sun.star.beans.Pair

    {
        if (!expected.getType().equals("__ROOT__"))
            throw new RuntimeException("doTest: expected: root");
        if (!actual.getType().equals("__ROOT__"))
            throw new RuntimeException("doTest: actual: root");
        m_StackExpected.push(new Pair(expected, expected.createEnumeration()));
        m_StackActual.push(new Pair(actual, actual.createEnumeration()));
        do {
            traverse(m_StackExpected, m_BufferExpected);
            traverse(m_StackActual, m_BufferActual);
        //??? root?
            testBuffer();
View Full Code Here

Examples of com.tdunning.plume.Pair

      reducer.process(Pair.create(arg0.obj, vals), new EmitFn() {
      @Override
        public void emit(Object v) {
          try {
            if(v instanceof Pair) {
              Pair p = (Pair)v;
              mos.write(arg0.sourceId+"", p.getKey(), p.getValue());
            } else {
              mos.write(arg0.sourceId+"", NullWritable.get(), (WritableComparable)v);
            }
          } catch (Exception e) {
            e.printStackTrace(); // TODO How to report this
View Full Code Here

Examples of com.twitter.joauth.Request.Pair

    // TODO: this is a little odd: we already encoded the values earlier, but using URLEncodedUtils.parse will decode the values,
    // which we will encode again.
    List<NameValuePair> httpGetParams = URLEncodedUtils.parse(request.getURI().getRawQuery(), Charsets.UTF_8);
    List<Pair> javaParams = new ArrayList<Pair>(httpGetParams.size());
    for (NameValuePair params : httpGetParams) {
      Pair tuple = new Pair(UrlCodec.encode(params.getName()), UrlCodec.encode(params.getValue()));
      javaParams.add(tuple);
    }

    if (postParams != null) {
      List<NameValuePair> httpPostParams = URLEncodedUtils.parse(postParams, Charsets.UTF_8);

      for (NameValuePair params : httpPostParams) {
        Pair tuple = new Pair(UrlCodec.encode(params.getName()), UrlCodec.encode(params.getValue()));
        javaParams.add(tuple);
      }
    }

    long timestampSecs = generateTimestamp();
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.