Examples of Pair


Examples of net.sf.jasperreports.engine.util.Pair

    if (columnTotalGroup != null && !columnGroupsMap.containsKey(columnTotalGroup))
    {
      throw new JRException("Row group " + columnTotalGroup + " does not exist.");
    }
   
    Object cellKey = new Pair(rowTotalGroup, columnTotalGroup);
    if (cellsMap.containsKey(cellKey))
    {
      throw new JRException("Duplicate cell in crosstab.");
    }
   
View Full Code Here

Examples of net.sf.jasperreports.engine.util.Pair

   * @param columnTotalGroup the cell's total column group
   * @return the removed cell
   */
  public JRCrosstabCell removeCell(String rowTotalGroup, String columnTotalGroup)
  {
    Object cellKey = new Pair(rowTotalGroup, columnTotalGroup);
   
    JRCrosstabCell cell = (JRCrosstabCell) cellsMap.remove(cellKey);
    if (cell != null)
    {
      cellsList.remove(cell);
View Full Code Here

Examples of net.sf.jasperreports.engine.util.Pair

      {
        JRDesignCrosstabCell cell =
          (JRDesignCrosstabCell)((JRDesignCrosstabCell)cellsList.get(i)).clone();
        adjustCrosstabReference(clone, (JRDesignCellContents) cell.getContents());
        clone.cellsList.add(cell);
        clone.cellsMap.put(new Pair(cell.getRowTotalGroup(), cell.getColumnTotalGroup()), cell);
      }
    }
   
    // clone not preprocessed
    clone.crossCells = null;
View Full Code Here

Examples of net.sf.jasperreports.engine.util.Pair

          if (seriesLinks == null)
          {
            seriesLinks = new HashMap();
            itemHyperlinks.put(crtXyzSeries.getSeries(), seriesLinks);
          }
          Pair xyKey = new Pair(crtXyzSeries.getXValue(), crtXyzSeries.getYValue());
          seriesLinks.put(xyKey, crtXyzSeries.getPrintItemHyperlink());
        }
      }
    }
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.util.Pair

        {
          Rectangle renderingArea = new Rectangle(image.getWidth(), image.getHeight());
         
          if (renderer.getType() == JRRenderable.TYPE_IMAGE)
          {
            imageMapName = (String) imageMaps.get(new Pair(renderer.getId(), renderingArea));
          }
 
          if (imageMapName == null)
          {
            imageMapName = "map_" + getElementIndex(gridCell).toString();
            imageMapAreas = ((JRImageMapRenderer) originalRenderer).getImageAreaHyperlinks(renderingArea);//FIXMECHART
           
            if (renderer.getType() == JRRenderable.TYPE_IMAGE)
            {
              imageMaps.put(new Pair(renderer.getId(), renderingArea), imageMapName);
            }
          }
        }
      }
      else     // ie:   if(isUsingImagesToAlign)
View Full Code Here

Examples of nexj.core.scripting.Pair

    * for the nested transformation; may be null.
    */
   public void setTransformationArguments(Object arguments)
   {
      verifyNotReadOnly();
      m_transformationArguments = new Pair(Symbol.LIST, arguments);
   }
View Full Code Here

Examples of opennlp.tools.util.Pair

        }

        for (Iterator i = scanner.getPositions(sb).iterator();
             i.hasNext();) {
            Integer candidate = (Integer)i.next();
            Pair p = new Pair(sb, candidate);
            String type = (candidate.intValue() == sentEndPos) ? "T" : "F";
            SDEvent evt = new SDEvent(type,cg.getContext(p));

            if (null != tail) {
                tail.next = evt;
View Full Code Here

Examples of org.apache.avro.mapred.Pair

    LongWritable key = new LongWritable(1);

    Schema pairSchema = DBMapper.getPairSchema(val.getColumns());
    Schema keySchema = Pair.getKeySchema(pairSchema);
    Schema valueSchema = Pair.getValueSchema(pairSchema);
    Pair pair = new Pair<GenericRecord, GenericRecord>(pairSchema);

    GenericRecord keyRecord = new GenericData.Record(keySchema);
    keyRecord.put(0, key.get());
    GenericRecord valueRecord = new GenericData.Record(valueSchema);
    List<Schema.Field> fieldSchemas = valueSchema.getFields();
    for (int i = 0; i < val.getValues().size(); ++i) {
      Schema.Type type = fieldSchemas.get(i).schema().getType();
      if (type.equals(Schema.Type.STRING)) {
        Utf8 utf8 = new Utf8((String) val.getValues().get(i).toString());
        valueRecord.put(i, utf8);
      } else {
        valueRecord.put(i, val.getValues().get(i));
      }
    }
    pair.key(keyRecord);
    pair.value(valueRecord);

    mapper.map(key, val, output, reporter);
   
    verify(output).collect(new AvroValue<Pair>(pair), nullWritable);
  }
View Full Code Here

Examples of org.apache.cassandra.utils.Pair

        Pair<Integer, SynchronousQueue<Thread>> weightedQueue = queues.get(id);
        if (weightedQueue != null)
            // queue existed
            return weightedQueue;

        Pair<Integer, SynchronousQueue<Thread>> maybenew = new Pair(getWeight(id), new SynchronousQueue<Thread>(true));
        weightedQueue = queues.putIfAbsent(id, maybenew);
        if (weightedQueue == null)
            // created new queue
            return maybenew;
View Full Code Here

Examples of org.apache.commons.lang3.tuple.Pair

*/
  @SuppressWarnings({ "rawtypes", "unchecked" })
private DefaultMutableTreeNode createNode(Doc doc)
  {
    //System.out.println("handle " + doc.name());
    Pair pair = Pair.of(doc, new ArrayList<String>());
   
    DefaultMutableTreeNode node = new DefaultMutableTreeNode(pair);
    doc2node.put(doc, node);
    return node;
  }
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.