Interface PUnion<Union extends PUnion<Union>>

  • All Superinterfaces:
    java.lang.Comparable<Union>, PMessage<Union>, PMessageOrBuilder<Union>, PValue<Union>, net.morimekta.util.Stringable

    public interface PUnion<Union extends PUnion<Union>>
    extends PMessage<Union>
    Base class for all unions.
    • Method Detail

      • unionFieldIsSet

        boolean unionFieldIsSet()
        Returns:
        Returns true if the union has a field set. If true unionField() will not throw an exception.
      • unionField

        @Nonnull
        PField<Union> unionField()
        The user should be able to assume that this value never is null.
        Returns:
        The field set on the union.
        Throws:
        java.lang.IllegalStateException - If no field is set.