code: static Object getIndexObject(String s)
      {
          long indexTest = indexFromString(s);
          if (indexTest >= 0) {
              return Integer.valueOf((int)indexTest);
          }
          return s;
      }
docs: If s represents index, then return index value wrapped as Integer
  and othewise return s.