private static int sizeToInt ( String size ) { if ( size == null ) return - 1 ; if ( "full" . equals ( size ) ) return 12 ; if ( "full-size" . equals ( size ) ) return 12 ; if ( "fullSize" . equals ( size ) ) return 12 ; if ( "full-width" . equals ( size ) ) return 12 ; if ( "fullWidth" . equals ( size ) ) return 12 ; if ( "half" . equals ( size ) ) return 6 ; if ( "one-third" . equals ( size ) ) return 4 ; if ( "oneThird" . equals ( size ) ) return 4 ; if ( "two-thirds" . equals ( size ) ) return 8 ; if ( "twoThirds" . equals ( size ) ) return 8 ; if ( "one-fourth" . equals ( size ) ) return 3 ; if ( "oneFourth" . equals ( size ) ) return 3 ; if ( "three-fourths" . equals ( size ) ) return 9 ; if ( "threeFourths" . equals ( size ) ) return 9 ; if ( size . length ( ) > 2 ) { size = size . replace ( "columns" , "" ) ; size = size . replace ( "column" , "" ) ; size = size . trim ( ) ; } return new Integer ( size ) . intValue ( ) ; }
Convert the specified size to int value