Package net.jini.config.AbstractConfiguration

Examples of net.jini.config.AbstractConfiguration.Primitive


        } else {
            for (int j = 0; j < primitiveCases.length; ++j) {
                Object[] subCase = primitiveCases[j];
                if (component.equals(validComponentName)
                        && name.equals(subCase[0])) {
                    lastReturn = new Primitive(subCase[1]);
                    return lastReturn;
                }
            }
        }
  throw new NoSuchEntryException(
View Full Code Here


        } else {
            for (int j = 0; j < primitiveCases.length; ++j) {
                Object[] subCase = primitiveCases[j];
                if (component.equals(validComponentName)
                        && name.equals(subCase[0])) {
                    lastReturn = new Primitive(subCase[1]);
                    return lastReturn;
                }
            }
        }
  throw new NoSuchEntryException(
View Full Code Here

      this.value = value;
  }

  public Object run() {
      try {
    return new Primitive(value);
      } catch (Exception e) {
    return e;
      }
  }
View Full Code Here

       
        // 1 equals
        Class type = (Class)testCase[0];
        Object somePrimitiveValue = testCase[1];
        Object differentPrimitiveValue = testCase[2];
        Primitive p = new Primitive(somePrimitiveValue);
        Primitive p2 = new Primitive(somePrimitiveValue);
        Primitive p3 = new Primitive(differentPrimitiveValue);
        if (!p.equals(p) || !p.equals(p2) || p.equals(p3) || p.equals(type)) {
            throw new TestException(
                    "equals method returns invalid value");
        }
       
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        // 1 primitive types
        new Primitive(new Boolean(true));
        new Primitive(new Byte((byte) 5));
        new Primitive(new Character('f'));
        new Primitive(new Short((short) 11222));
        new Primitive(new Integer(1222333));
        new Primitive(new Long(111222333444L));
        new Primitive(new Float(1.5f));
        new Primitive(new Double(2.5d));

        // 2 null
        try{
            new Primitive(null);
            throw new TestException(
                    "IllegalArgumentException should be thrown");
        } catch (IllegalArgumentException ignore) {
        }

        // 3 not associated wrapper class object
        try{
            new Primitive("Some string");
            throw new TestException(
                    "IllegalArgumentException should be thrown");
        } catch (IllegalArgumentException ignore) {
        }
    }
View Full Code Here

TOP

Related Classes of net.jini.config.AbstractConfiguration.Primitive

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.