static ConstantSize valueOf(String encodedValueAndUnit,boolean horizontal){
  String[] split=ConstantSize.splitValueAndUnit(encodedValueAndUnit);
  String encodedValue=split[0];
  String encodedUnit=split[1];
  Unit unit=Unit.valueOf(encodedUnit,horizontal);
  double value=Double.parseDouble(encodedValue);
  if (unit.requiresIntegers) {
    checkArgument(value == (int)value,"%s value %s must be an integer.",unit,encodedValue);
  }
  return new ConstantSize(value,unit);
}

static ConstantSize valueOf ( String encodedValueAndUnit , boolean horizontal ) { String [ ] split = ConstantSize . splitValueAndUnit ( encodedValueAndUnit ) ; String encodedValue = split [ 0 ] ; String encodedUnit = split [ 1 ] ; Unit unit = Unit . valueOf ( encodedUnit , horizontal ) ; double value = Double . parseDouble ( encodedValue ) ; if ( unit . requiresIntegers ) { checkArgument ( value == ( int ) value , "%s value %s must be an integer." , unit , encodedValue ) ; } return new ConstantSize ( value , unit ) ; }
creates and returns a constantsize from the given encoded size and unit description .
