Examples of ShortValue


Examples of org.apache.flink.types.ShortValue

  @Override
  protected ShortValue[] getTestData() {
    Random rnd = new Random(874597969123412341L);
    int rndInt = rnd.nextInt(32767);
   
    return new ShortValue[] {new ShortValue((short) 0), new ShortValue((short) 1), new ShortValue((short) -1),
              new ShortValue((short) rndInt), new ShortValue((short) -rndInt),
              new ShortValue((short) -32767), new ShortValue((short) 32768)};
  }
View Full Code Here

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

                return null;
            }

        } else if ( DataType.TYPE_NUMERIC_SHORT.equals( dataType ) ) {
            try {
                return new ShortValue( new Short( value ) );

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

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

    }

    @Test
    public void testShortValue() {
        final Short tv = new Short( "8" );
        final ShortValue v = new ShortValue( tv );
        assertEquals( tv,
                      v.getValue() );

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

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

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

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "shortField",
                                                          "==",
                                                          new ShortValue( new Short( "1000" ) ) );
        model.setRoot( type );
        type.addChild( c1 );

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

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

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "Person",
                                                          "shortField",
                                                          "==",
                                                          new ShortValue( new Short( "1000" ) ) );
        expected.setRoot( type );
        type.addChild( c1 );

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

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

        model.setTreeName( "test" );

        final TypeNode type = new TypeNodeImpl( "Person" );
        final ConstraintNode c1 = new ConstraintNodeImpl( "shortField",
                                                          "==",
                                                          new ShortValue( new Short( "1000" ) ) );
        model.setRoot( type );
        type.getChildren().add( c1 );

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

Examples of org.jboss.errai.codegen.framework.literal.ShortValue

    return caseBlock(value);
  }

  @Override
  public BlockBuilder<CaseBlockBuilder> case_(short value) {
    ShortValue val = (ShortValue) LiteralFactory.getLiteral(value);
    return case_(val);
  }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.literal.ShortValue

    return caseBlock(value);
  }

  @Override
  public BlockBuilder<CaseBlockBuilder> case_(short value) {
    ShortValue val = (ShortValue) LiteralFactory.getLiteral(value);
    return case_(val);
  }
View Full Code Here

Examples of org.jboss.errai.codegen.literal.ShortValue

    return caseBlock(value);
  }

  @Override
  public BlockBuilder<CaseBlockBuilder> case_(short value) {
    ShortValue val = (ShortValue) LiteralFactory.getLiteral(value);
    return case_(val);
  }
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.codegen.literal.ShortValue

    return caseBlock(value);
  }

  @Override
  public BlockBuilder<CaseBlockBuilder> case_(short value) {
    ShortValue val = (ShortValue) LiteralFactory.getLiteral(value);
    return case_(val);
  }
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.