Examples of calculateIndex()


Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      compData = new CompositeDataSupport(rowType, map);
      assertTrue("Didn't expect containsValue on value still not present", data.containsValue((Object) compData) == false);

      assertTrue("Didn't expect containsValue still wrong composite type", data.containsValue((Object) compData2) == false);

      data.remove(data.calculateIndex(compData));
      assertTrue("Didn't expect removed data in containsValue", data.containsValue((Object) compData) == false);
   }

   public void testContainsValueCompositeData()
      throws Exception
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      compData = new CompositeDataSupport(rowType, map);
      assertTrue("Didn't expect containsValue on value still not present", data.containsValue(compData) == false);

      assertTrue("Didn't expect containsValue still wrong composite type", data.containsValue(compData2) == false);

      data.remove(data.calculateIndex(compData));
      assertTrue("Didn't expect removed data in containsValue", data.containsValue(compData) == false);
   }

   public void testGetObject()
      throws Exception
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      String toString = data.toString();

      assertTrue("toString() should contain the tabular type",
         toString.indexOf(tabularType.toString()) != -1);
      assertTrue("toString() should contain index=compositeData for compData",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData)) + "=" + compData) != -1);
      assertTrue("toString() should contain index=compositeData for compData2",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData2)) + "=" + compData2) != -1);
      assertTrue("toString() should contain index=compositeData for compData3",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData3)) + "=" + compData3) != -1);
   }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      assertTrue("toString() should contain the tabular type",
         toString.indexOf(tabularType.toString()) != -1);
      assertTrue("toString() should contain index=compositeData for compData",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData)) + "=" + compData) != -1);
      assertTrue("toString() should contain index=compositeData for compData2",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData2)) + "=" + compData2) != -1);
      assertTrue("toString() should contain index=compositeData for compData3",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData3)) + "=" + compData3) != -1);
   }

   public void testSerialization()
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      assertTrue("toString() should contain index=compositeData for compData",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData)) + "=" + compData) != -1);
      assertTrue("toString() should contain index=compositeData for compData2",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData2)) + "=" + compData2) != -1);
      assertTrue("toString() should contain index=compositeData for compData3",
         toString.indexOf(Arrays.asList(data.calculateIndex(compData3)) + "=" + compData3) != -1);
   }

   public void testSerialization()
      throws Exception
   {
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      caught = false;
      try
      {
         TabularDataSupport data = new TabularDataSupport(tabularType);
         data.calculateIndex(null);
      }
      catch (NullPointerException e)
      {
         caught = true;
      }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      caught = false;
      try
      {
         TabularDataSupport data = new TabularDataSupport(tabularType);
         data.calculateIndex(compData2);
      }
      catch (InvalidOpenTypeException e)
      {
         caught = true;
      }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      HashMap map = new HashMap();
      map.put("name1", "value1");
      map.put("name2", new Integer(2));
      CompositeDataSupport compData = new CompositeDataSupport(rowType, map);
      Object[] index = data.calculateIndex(compData);

      assertTrue("Expected index element 0 to be value1", index[0].equals("value1"));
      assertTrue("Expected index element 1 to be 2", index[1].equals(new Integer(2)));

      map = new HashMap();
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      map = new HashMap();
      map.put("name1", "value2");
      map.put("name2", new Integer(3));
      compData = new CompositeDataSupport(rowType, map);
      index = data.calculateIndex(compData);

      assertTrue("Expected index element 0 to be value2", index[0].equals("value2"));
      assertTrue("Expected index element 1 to be 3", index[1].equals(new Integer(3)));
   }
View Full Code Here

Examples of javax.management.openmbean.TabularDataSupport.calculateIndex()

      map = new HashMap();
      map.put("name1", "value1");
      map.put("name2", new Integer(3));
      compData = new CompositeDataSupport(rowType, map);
      assertTrue("Didn't expect containsKey on index still not present",
         data.containsKey((Object) data.calculateIndex(compData)) == false);

      data.remove(index);
      assertTrue("Didn't expect removed data in containsKey", data.containsKey((Object) index) == false);
   }
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.