Package com.volantis.shared.metadata.type.mutable

Examples of com.volantis.shared.metadata.type.mutable.MutableUnitType


        return new ImmutableUnitTypeImpl();
    }

    // Javadoc inherited.
    public void testEqualsAndHashcodeImplementedCorrectly() {
        MutableUnitType fieldDefinition1 = createMutableUnitTypeForTestingEquals();
        MutableUnitType fieldDefinition2 = createMutableUnitTypeForTestingEquals();

        // test that both the values are equal and they have the same hash codes
        assertEquals("Object 1 should be equal to object 2", fieldDefinition1, fieldDefinition2);
        MetaDataTestCaseHelper.ensureHashcodesEqual(fieldDefinition1, fieldDefinition2);
    }
View Full Code Here


        final ImmutableNumberSubTypeConstraint subTypeConstraint =
            CONSTRAINT_FACTORY.getNumberSubTypeConstraint(Integer.class);
        numberType.setNumberSubTypeConstraint(subTypeConstraint);
        quantityType.setMagnitudeType(numberType);

        final MutableUnitType unitType = TYPE_FACTORY.createUnitType();
        final MutableEnumeratedConstraint enumeratedConstraint =
            CONSTRAINT_FACTORY.createEnumeratedConstraint();
        final List enumeratedValues =
            enumeratedConstraint.getMutableEnumeratedValues();
        enumeratedValues.add(QuantityUnits.MILLIMETERS);
        enumeratedValues.add(QuantityUnits.CENTIMETERS);
        enumeratedValues.add(QuantityUnits.INCHES);
        unitType.setEnumeratedConstraint(enumeratedConstraint);
        quantityType.setUnitType(unitType);

        // normal case
        MutableQuantityValue quantityValue = VALUE_FACTORY.createQuantityValue();
        final MutableNumberValue magnitudeValue =
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.type.mutable.MutableUnitType

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.