private static Format getBasicFormat()

in src/org/jetbrains/r/visualization/inlays/table/filters/gui/ParserModel.java [215:256]


  private static Format getBasicFormat(Class<?> cl) {
    // for Strings, we just use null.
    Format fmt = basicFormats.get(cl);
    if (fmt == null) {
      if (cl == String.class) {
        fmt = new StringTypeFormat();
      }
      else if (cl == Boolean.class) {
        fmt = new BooleanTypeFormat();
      }
      else if (cl == Integer.class) {
        fmt = new IntegerTypeFormat();
      }
      else if (cl == Long.class) {
        fmt = new LongTypeFormat();
      }
      else if (cl == Short.class) {
        fmt = new ShortTypeFormat();
      }
      else if (cl == Float.class) {
        fmt = new FloatTypeFormat();
      }
      else if (cl == Double.class) {
        fmt = new DoubleTypeFormat();
      }
      else if (cl == Byte.class) {
        fmt = new ByteTypeFormat();
      }
      else if (cl == Character.class) {
        fmt = new CharacterTypeFormat();
      }
      else if (cl == Date.class) {
        fmt = getDefaultDateFormat();
      }

      if (fmt != null) {
        basicFormats.put(cl, fmt);
      }
    }

    return fmt;
  }