Package com.volantis.shared.metadata.value

Examples of com.volantis.shared.metadata.value.NumberValue


        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        MutableBooleanValue allowableValue = (MutableBooleanValue) f.getValueFactory()
            .createBooleanValue().createMutable();
        String allowableKey = "key";

        NumberValue forbiddenKey = (NumberValue) f.getValueFactory()
            .createNumberValue();

        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);
View Full Code Here


        allowableValue.setValue(Boolean.TRUE);

        BooleanValue newAllowableValue = (BooleanValue) f.getValueFactory()
            .createBooleanValue();
        String allowableKey = "key";
        NumberValue forbiddenValue = (NumberValue) f.getValueFactory().createNumberValue();

        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);
View Full Code Here

        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        MutableBooleanValue allowableObject = (MutableBooleanValue) f.getValueFactory()
            .createBooleanValue().createMutable();
        allowableObject.setValue(Boolean.TRUE);

        NumberValue unallowableObject = (NumberValue) f.getValueFactory()
            .createNumberValue();

        TypedSet typedSet = new TypedSet(new HashSet(), BooleanValue.class);

        try {
View Full Code Here

    public boolean equals(Object obj) {
        if (!(obj instanceof NumberValue)) {
            return false;
        }

        final NumberValue other = (NumberValue) obj;
        final Number otherValue = other.getValueAsNumber();
        return (value == null && otherValue == null) ||
            (value != null && value.equals(otherValue));
    }
View Full Code Here

        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        MutableBooleanValue allowableObject = (MutableBooleanValue) f.getValueFactory()
            .createBooleanValue().createMutable();
        allowableObject.setValue(Boolean.TRUE);

        NumberValue unallowableObject = (NumberValue) f.getValueFactory()
            .createNumberValue();

        TypedList typedList = new TypedList(new ArrayList(), BooleanValue.class);

        try {
View Full Code Here

        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        MutableBooleanValue allowableObject = (MutableBooleanValue) f.getValueFactory()
            .createBooleanValue().createMutable();
        allowableObject.setValue(Boolean.TRUE);

        NumberValue unallowableObject = (NumberValue) f.getValueFactory()
            .createNumberValue();
        TypedList typedList = new TypedList(new ArrayList(), BooleanValue.class);
        ListIterator iterator = typedList.listIterator();

        // check that the list iterator will allow an permitted type to be added
View Full Code Here

    protected Collection verify(final MetaDataValue value, final String path) {
        final Collection errors = super.verify(value, path);
        // if this is not a NumberValue, a type error is reported by the super
        // class
        if (value instanceof NumberValue) {
            final NumberValue numberValue = (NumberValue) value;
            final Number number = numberValue.getValueAsNumber();
            if (number != null) {
                // check number sub-type constraint
                if (numberSubTypeConstraint != null) {
                    if (!numberSubTypeConstraint.getNumberSubType().equals(
                            number.getClass())) {
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.value.NumberValue

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.