Enum InheritanceRelationship

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<InheritanceRelationship>

    public enum InheritanceRelationship
    extends java.lang.Enum<InheritanceRelationship>
    Represents the inheritance relationship between two types (described as "type A" and "type B" in relation to the values).
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DirectSubType
      Type A is a direct sub-type of Type B.
      DirectSuperType
      Type A is the direct parent of Type B
      MissingTypeInfo
      Indicates that type information is missing for one of the ids
      None
      Both types are known, but not related.
      Same
      If both types are equal
      SubType
      Type A is a sub type ancestor of Type B, but not a direct sub type.
      SuperType
      Type A is a super ancestor of Type B, but not its direct supertype.
    • Method Detail

      • values

        public static InheritanceRelationship[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (InheritanceRelationship c : InheritanceRelationship.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static InheritanceRelationship valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • compatible

        public boolean compatible​(InheritanceRelationship other)
        Returns whether this relationship is "compatible" with the other- if it's equal, or if this is more permissive than the actual relationship.
      • invert

        public InheritanceRelationship invert()
        Inverts the relationship. Only applicable for sub/super types. Other values return themselves.
      • isDeep

        public boolean isDeep()