Class StringEnumType<EnumT>

java.lang.Object
com.google.cloud.StringEnumType<EnumT>

@InternalApi public class StringEnumType<EnumT> extends Object
This represents a concept having a known set of acceptable String values, which can expand later due to new API features.
  • Constructor Details

  • Method Details

    • createAndRegister

      public EnumT createAndRegister(String constant)
      Create a new constant and register it in the known values.
    • valueOfStrict

      public EnumT valueOfStrict(String constant)
      Get the enum object for the given String constant, and throw an exception if the constant is not recognized.
    • valueOf

      public EnumT valueOf(String constant)
      Get the enum object for the given String constant, and allow unrecognized values.
    • values

      public EnumT[] values()
      Return the known values of this enum type.