public static Pair<String,String> split(String varName){
  int splitIndex=varName.indexOf('.');
  if (splitIndex < 0) {
    return null;
  }
  String left=varName.substring(0,splitIndex);
  String right=varName.substring(splitIndex + 1);
  if (left == null || left.length() == 0 || right == null || right.length() == 0) {
    return null;
  }
  return Pair.of(left,right);
}

public static Pair < String , String > split ( String varName ) { int splitIndex = varName . indexOf ( '.' ) ; if ( splitIndex < 0 ) { return null ; } String left = varName . substring ( 0 , splitIndex ) ; String right = varName . substring ( splitIndex + 1 ) ; if ( left == null || left . length ( ) == 0 || right == null || right . length ( ) == 0 ) { return null ; } return Pair . of ( left , right ) ; }
splits a qualified varname into two parts , a left and a right left will be the text before the first instance of ' . ' right will be everything else returns null if the varname could not be split for any reason
