public SelType newSelTypeObj()

in netflix-sel/src/main/java/com/netflix/sel/type/SelTypes.java [94:132]


  public SelType newSelTypeObj() {
    switch (this) {
      case STRING:
        return SelString.of(null);
      case LONG:
        return SelLong.of(0L);
      case DOUBLE:
        return SelDouble.of(0.0);
      case BOOLEAN:
        return SelBoolean.of(false);
      case STRING_ARRAY:
        return new SelArray(0, STRING_ARRAY);
      case LONG_ARRAY:
        return new SelArray(0, LONG_ARRAY);
      case DOUBLE_ARRAY:
        return new SelArray(0, DOUBLE_ARRAY);
      case BOOLEAN_ARRAY:
        return new SelArray(0, BOOLEAN_ARRAY);
      case MAP:
        return SelMap.of(null);

      case DATETIME:
        return SelJodaDateTime.of(null);
      case DATETIME_ZONE:
        return SelJodaDateTimeZone.of(null);
      case DATETIME_DAYS:
        return SelJodaDateTimeDays.of(null);
      case DATETIME_PROPERTY:
        return SelJodaDateTimeProperty.of(null);
      case DATETIME_FORMATTER:
        return SelJodaDateTimeFormatter.of(null);

      case UUID:
        return SelJavaUUID.of(null);
      default:
        throw new UnsupportedOperationException(
            "Not support creating an empty object for type " + this.name());
    }
  }