public static MetaKey fromString ( final String string ) { final int idx = string . indexOf ( ' ' ) ; if ( idx < 1 ) { // -1: none at all, 0: empty namespace return null ; } if ( idx + 1 >= string . length ( ) ) { // empty key segment return null ; } return new MetaKey ( string . substring ( 0 , idx ) , string . substring ( idx + 1 ) , true ) ; }
Convert a string to a MetaKey if possible