public static ZoomIntervalConfiguration fromString ( String confString ) { String [ ] splitted = confString . split ( "," ) ; if ( splitted . length % 3 != 0 ) { throw new IllegalArgumentException ( "invalid zoom interval configuration, amount of comma-separated values must be a multiple of 3" ) ; } byte [ ] [ ] intervals = new byte [ splitted . length / 3 ] [ 3 ] ; for ( int i = 0 ; i < intervals . length ; i ++ ) { intervals [ i ] [ 0 ] = Byte . parseByte ( splitted [ i * 3 ] ) ; intervals [ i ] [ 1 ] = Byte . parseByte ( splitted [ i * 3 + 1 ] ) ; intervals [ i ] [ 2 ] = Byte . parseByte ( splitted [ i * 3 + 2 ] ) ; } return ZoomIntervalConfiguration . newInstance ( intervals ) ; }
Create a new ZoomIntervalConfiguration from the given string representation . Checks for validity .