newItemValue = ((Value) itemValue).toValue(); } else { newItemValue = itemValue;
case "java.lang.Boolean": if (event instanceof Value) { event = ((Value) event).booleanValue(); } else { event = Conversions.coerce(actualReturnType, event);
public Object parse( char[] chars ) { lastIndex = chars.length -1; __index = 0; charArray = chars; Value value = decodeValueOverlay( ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } }
public void chopList() { for ( Object obj : list ) { if ( obj == null ) continue; if ( obj instanceof Value ) { Value value = ( Value ) obj; if ( value.isContainer() ) { chopContainer( value ); } else { value.chop(); } } } }
if ( value.isContainer() ) { Object oValue = value.toValue(); if ( oValue instanceof Map ) { newCollection.add( fromValueMap( ( Map ) oValue, componentClass ) ); newCollection.add( Conversions.coerce( componentClass, value.toValue() ) ); int [] iarray = new int[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { iarray[index] = value.intValue(); index++; short [] sarray = new short[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { sarray[index] = value.shortValue(); index++; double [] darray = new double[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { darray[index] = value.doubleValue(); index++; float [] farray = new float[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { farray[index] = value.floatValue(); index++; long [] larray = new long[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) {
this.setInt ( obj, value.intValue() ); return; case LONG: this.setLong ( obj, value.longValue () ); return; case BOOLEAN: this.setBoolean ( obj, value.booleanValue () ); return; case BYTE: this.setByte ( obj, value.byteValue () ); return; case SHORT: this.setShort ( obj, value.shortValue () ); return; case CHAR: this.setChar ( obj, value.charValue () ); return; case DOUBLE: this.setDouble ( obj, value.doubleValue () ); return; case FLOAT: this.setFloat ( obj, value.floatValue () ); return; case INTEGER_WRAPPER: this.setObject ( obj, value.intValue () ); return; case LONG_WRAPPER: this.setObject ( obj, value.longValue () ); return;
public static BigDecimal toBigDecimal(Object obj) { if (obj instanceof BigDecimal) { return (BigDecimal) obj; } if (obj instanceof Value) { return ((Value) obj).bigDecimalValue(); } else if (obj instanceof String) { return new BigDecimal((String) obj); } else if (obj instanceof Number) { double val = ((Number) obj).doubleValue(); return BigDecimal.valueOf(val); } return null; }
public static BigInteger toBigInteger(Object obj) { if (obj instanceof BigInteger) { return (BigInteger) obj; } if (obj instanceof Value) { return ((Value) obj).bigIntegerValue(); } else if (obj instanceof String) { return new BigInteger((String) obj); } else if (obj instanceof Number) { long val = ((Number) obj).longValue(); return BigInteger.valueOf(val); } return null; }
if ( value.isContainer() ) { Object oValue = value.toValue(); if ( oValue instanceof Map ) { newCollection.add( fromValueMap( ( Map ) oValue, componentClass ) ); newCollection.add( Conversions.coerce( componentClass, value.toValue() ) ); int [] iarray = new int[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { iarray[index] = value.intValue(); index++; short [] sarray = new short[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { sarray[index] = value.shortValue(); index++; double [] darray = new double[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { darray[index] = value.doubleValue(); index++; float [] farray = new float[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { farray[index] = value.floatValue(); index++; long [] larray = new long[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) {
this.setInt ( obj, value.intValue() ); return; case LONG: this.setLong ( obj, value.longValue () ); return; case BOOLEAN: this.setBoolean ( obj, value.booleanValue () ); return; case BYTE: this.setByte ( obj, value.byteValue () ); return; case SHORT: this.setShort ( obj, value.shortValue () ); return; case CHAR: this.setChar ( obj, value.charValue () ); return; case DOUBLE: this.setDouble ( obj, value.doubleValue () ); return; case FLOAT: this.setFloat ( obj, value.floatValue () ); return; case INTEGER_WRAPPER: this.setObject ( obj, value.intValue () ); return; case LONG_WRAPPER: this.setObject ( obj, value.longValue () ); return;
public void chopList() { for ( Object obj : list ) { if ( obj == null ) continue; if ( obj instanceof Value ) { Value value = ( Value ) obj; if ( value.isContainer() ) { chopContainer( value ); } else { value.chop(); } } } }
public static BigDecimal toBigDecimal(Object obj) { if (obj instanceof BigDecimal) { return (BigDecimal) obj; } if (obj instanceof Value) { return ((Value) obj).bigDecimalValue(); } else if (obj instanceof String) { return new BigDecimal((String) obj); } else if (obj instanceof Number) { double val = ((Number) obj).doubleValue(); return BigDecimal.valueOf(val); } return null; }
public static BigInteger toBigInteger(Object obj) { if (obj instanceof BigInteger) { return (BigInteger) obj; } if (obj instanceof Value) { return ((Value) obj).bigIntegerValue(); } else if (obj instanceof String) { return new BigInteger((String) obj); } else if (obj instanceof Number) { long val = ((Number) obj).longValue(); return BigInteger.valueOf(val); } return null; }
if ( value.isContainer() ) { Object oValue = value.toValue(); if ( oValue instanceof Map ) { newCollection.add( fromValueMap( ( Map ) oValue, componentClass ) ); newCollection.add( Conversions.coerce( componentClass, value.toValue() ) ); int [] iarray = new int[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { iarray[index] = value.intValue(); index++; short [] sarray = new short[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { sarray[index] = value.shortValue(); index++; double [] darray = new double[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { darray[index] = value.doubleValue(); index++; float [] farray = new float[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { farray[index] = value.floatValue(); index++; long [] larray = new long[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) {
convertedValue = (V) ((Value) value).toValue(); } else { convertedValue = (V) value;
public Object parse( char[] chars ) { lastIndex = chars.length -1; __index = 0; charArray = chars; Value value = decodeValueOverlay( ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } }
if ( value.isContainer() ) { chopContainer( value ); } else { value.chop(); if ( object instanceof Value ) { Value value = (Value) object; if ( value.isContainer() ) { chopContainer( value ); } else { value.chop();
private boolean convertObjectToBoolean(String path, Object property) { if (!(property instanceof Boolean) && !(property instanceof CharSequence) && !(property instanceof Value)) { throw new IllegalArgumentException("Path " + path + " must resolve to a boolean like type value = \"" + property + "/"); } if (property instanceof Boolean) { return (Boolean) property; } if (property instanceof Value) { return ((Value) property).booleanValue(); } final String propValue = property.toString(); if (TRUE.contains(propValue)) { return true; } else if (FALSE.contains(propValue)) { return false; } else { throw new IllegalArgumentException("Path " + path + " must resolve to a boolean like type value = \"" + propValue + "/"); } }
if ( value.isContainer() ) { Object oValue = value.toValue(); if ( oValue instanceof Map ) { newCollection.add( fromValueMap( ( Map ) oValue, componentClass ) ); newCollection.add( Conversions.coerce( componentClass, value.toValue() ) ); int [] iarray = new int[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { iarray[index] = value.intValue(); index++; short [] sarray = new short[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { sarray[index] = value.shortValue(); index++; double [] darray = new double[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { darray[index] = value.doubleValue(); index++; float [] farray = new float[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) { farray[index] = value.floatValue(); index++; long [] larray = new long[collectionOfValues.size()]; for ( Value value : ( List<Value> ) collectionOfValues ) {
private Object convert( Value value ) { return value.toValue(); }