Class CausalRelationshipComparator

    • Constructor Detail

      • CausalRelationshipComparator

        public CausalRelationshipComparator​(Comparator<CvTerm> cvTermComparator,
                                            EntityComparator participantComparator)

        Constructor for CausalRelationshipComparator.

        Parameters:
        cvTermComparator - a Comparator object.
        participantComparator - a EntityComparator object.
    • Method Detail

      • getCvTermComparator

        public Comparator<CvTerm> getCvTermComparator()

        Getter for the field cvTermComparator.

        Returns:
        a Comparator object.
      • compare

        public int compare​(CausalRelationship causalRelationship1,
                           CausalRelationship causalRelationship2)
        It will first compare the relationType using AbstractCvTermComparator. If both relationTypes are identical, it will compare the target using ParticipantBaseComparator
        Specified by:
        compare in interface Comparator<CausalRelationship>
        Parameters:
        causalRelationship1 - : first causal relationship
        causalRelationship2 - : second causal relationship
        Returns:
        the comparison value