Class LinkType


  • @OpenApiAll
    public class LinkType
    extends java.lang.Object
    Holds information about a possible relationship - its class and stereotypes. Given this information it is possible to create a relationship and check whether any relationship is of this type.
    • Constructor Summary

      Constructors 
      Constructor Description
      LinkType​(java.lang.Class clazz)
      Constructs this relationship type.
      LinkType​(java.lang.Class clazz, java.util.Set<Stereotype> stereotypes)
      Constructs this relationship type.
    • Constructor Detail

      • LinkType

        public LinkType​(java.lang.Class clazz,
                        java.util.Set<Stereotype> stereotypes)
        Constructs this relationship type.
        Parameters:
        clazz - class of the relationship.
        stereotypes - stereotypes of the relationship.
      • LinkType

        public LinkType​(java.lang.Class clazz)
        Constructs this relationship type.
        Parameters:
        clazz - class of the relationship.
    • Method Detail

      • getClazz

        public java.lang.Class getClazz()
        Gets class of the relationship.
        Returns:
        class of the relationship.
      • getStereotypes

        public java.util.Set<Stereotype> getStereotypes()
        Gets stereotypes of the relationship.
        Returns:
        stereotypes of the relationship.
      • create

        public static LinkType create​(Element relationship)
        Creates type for a given relationship.
        Parameters:
        relationship - relationship for which to get the type.
        Returns:
        type of the given relationship.
      • isTypeOf

        public boolean isTypeOf​(Relationship relationship)
        Checks if given relationship is of this type.
        Parameters:
        relationship - relationship to check.
        Returns:
        true if given relationship is of given type, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object