Examples of calculateIndex()


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 org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      TableMetaType tableType = initTableType();

      TableValueSupport data = new TableValueSupport(tableType);

      CompositeValue compData = initCompositeValue(data);
      Object[] index = data.calculateIndex(compData);

      assertEquals("Expected index element 0 to be value1", index[0], initStringValue1());
      assertEquals("Expected index element 1 to be 2", index[1], initInteger2());

      compData = initCompositeValue3(data);
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      assertEquals("Expected index element 0 to be value1", index[0], initStringValue1());
      assertEquals("Expected index element 1 to be 2", index[1], initInteger2());

      compData = initCompositeValue3(data);
      index = data.calculateIndex(compData);

      assertEquals("Expected index element 0 to be value2", index[0], initStringValue2());
      assertEquals("Expected index element 1 to be 3", index[1], initInteger3());
   }
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      compData = initCompositeValue(data);
      data.put(compData);
      assertTrue("Expected containsKey", data.containsKey(index));

      compData = initCompositeValue2(data);
      assertFalse("Didn't expect containsKey on index still not present", data.containsKey(data.calculateIndex(compData)));

      data.remove(index);
      assertFalse("Didn't expect removed data in containsKey", data.containsKey(index));
   }
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      compData = initCompositeValue2(data);
      assertFalse("Didn't expect containsValue on value still not present", data.containsValue(compData));

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

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

   /**
    * Test the get for a table value
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      String toString = data.toString();

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

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

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

   /**
 
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

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

   /**
    * Test the serialization for a table value
    *
 
View Full Code Here

Examples of org.jboss.metatype.api.values.TableValueSupport.calculateIndex()

      }
     
      try
      {
         TableValueSupport data = new TableValueSupport(tableType);
         data.calculateIndex(null);
         fail("Expected IllegalArgumentException for calculate index on null object");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
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.