Class DefaultRelation

  • All Implemented Interfaces:
    Relation

    public class DefaultRelation
    extends Object
    implements Relation
    A default simple implementation of a relation.
    Author:
    burgetr
    • Constructor Detail

      • DefaultRelation

        public DefaultRelation​(String name)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Relation
        Gets the name of the relation.
        Specified by:
        getName in interface Relation
        Returns:
        the relation name
      • setName

        public void setName​(String name)
      • isSymmetric

        public boolean isSymmetric()
        Description copied from interface: Relation
        Is this relation symmetric? i.e. xRy => yRx
        Specified by:
        isSymmetric in interface Relation
        Returns:
        true when the relation is symmetric
      • getInverse

        public Relation getInverse()
        Description copied from interface: Relation
        The inverse relation to the given relation (if applicable).
        Specified by:
        getInverse in interface Relation
        Returns:
        the inverse relation or null
      • setSymmetric

        public Relation setSymmetric​(boolean symmetric)