Package org.apache.commons.collections

Examples of org.apache.commons.collections.MultiMap


    @Test
    public void testOverrideWithoutPreferred() throws Exception
    {
        DefaultAppBloodhound bh = new DefaultAppBloodhound();
        MultiMap overrides = new MultiValueMap();
        overrides.put("properties", new TestDescriptorParserNoAnnotation());

        // test with weigh attribute (we have 3 candidates now)
        bh.mergeParserOverrides(overrides);
        assertEquals(1, bh.parserRegistry.size());
        DescriptorParser result = bh.parserRegistry.get("properties");
View Full Code Here


    @Test
    public void testMixedOverrides() throws Exception
    {
        DefaultAppBloodhound bh = new DefaultAppBloodhound();
        MultiMap overrides = new MultiValueMap();
        overrides.put("properties", new TestDescriptorParserNoAnnotation());
        overrides.put("properties", new TestDescriptorParserDefault());

        // test with weigh attribute (we have 3 candidates now)
        bh.mergeParserOverrides(overrides);
        assertEquals(1, bh.parserRegistry.size());
        DescriptorParser result = bh.parserRegistry.get("properties");
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

        // defaults first
        parserRegistry.put("properties", new PropertiesDescriptorParser());

        final Iterator<DescriptorParser> it = ServiceRegistry.lookupProviders(DescriptorParser.class);

        MultiMap overrides = new MultiValueMap();
        while (it.hasNext())
        {
            final DescriptorParser parser = it.next();
            overrides.put(parser.getSupportedFormat(), parser);
        }
        mergeParserOverrides(overrides);
    }
View Full Code Here

        assertEquals(true, map.containsValue("A", "AA"));
        assertEquals(false, map.containsValue("A", "AB"));
    }

    public void testPutAll_Map1() {
        MultiMap original = new MultiValueMap();
        original.put("key", "object1");
        original.put("key", "object2");

        MultiValueMap test = new MultiValueMap();
        test.put("keyA", "objectA");
        test.put("key", "object0");
        test.putAll(original);
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

   
    private void addFieldsToParsedObject(Document doc, ParsedObject o)
    {
        try
        {
            MultiMap multiKeywords = new MultiHashMap();
            MultiMap multiFields = new MultiHashMap();
            HashMap fieldMap = new HashMap();
           
            Field classNameField = doc.getField(ParsedObject.FIELDNAME_CLASSNAME);
            if(classNameField != null)
            {
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.MultiMap

Copyright © 2018 www.massapicom. 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.