Package org.drools.workbench.models.guided.dtree.shared.model.values.impl

Examples of org.drools.workbench.models.guided.dtree.shared.model.values.impl.ByteValue


                return null;
            }

        } else if ( DataType.TYPE_NUMERIC_BYTE.equals( dataType ) ) {
            try {
                return new ByteValue( new Byte( value ) );

            } catch ( NumberFormatException e ) {
                messages.add( new DataTypeConversionErrorParserMessage( value,
                                                                        Byte.class.getName() ) );
                return null;
View Full Code Here


    }

    @Test
    public void testByteValue() {
        final Byte tv = new Byte( "8" );
        final ByteValue v = new ByteValue( tv );
        assertEquals( tv,
                      v.getValue() );

        v.setValue( "8" );
        assertEquals( tv,
                      v.getValue() );

        v.setValue( "abc" );
        assertEquals( new Byte( "0" ),
                      v.getValue() );
    }
View Full Code Here

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "byteField",
                                                          "==",
                                                          new ByteValue( new Byte( "100" ) ) );
        model.setRoot( type );
        type.addChild( c1 );

        final String drl = GuidedDecisionTreeDRLPersistence.getInstance().marshal( model );
        assertEqualsIgnoreWhitespace( expected,
View Full Code Here

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "byteField",
                                                          "==",
                                                          new ByteValue( new Byte( "100" ) ) );
        expected.setRoot( type );
        type.addChild( c1 );

        addModelField( "Person",
                       "this",
View Full Code Here

        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "byteField",
                                                          "==",
                                                          new ByteValue( new Byte( "100" ) ) );
        model.setRoot( type );
        type.getChildren().add( c1 );

        final String drl = GuidedDecisionTreeDRLPersistence.getInstance().marshal( model );
        assertEqualsIgnoreWhitespace( expected,
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtree.shared.model.values.impl.ByteValue

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.