Interface ImmutableCompletePreference

    • Method Detail

      • getRank

        int getRank​(Alternative a)
        The rank of an alternative is one plus the number of alternatives strictly preferred to it.
        Parameters:
        a - is an Alternative
        Returns:
        the rank of this alternative (a number between 1 and n) where n is the total number of Alternative instances.
        Throws:
        IllegalArgumentException - if a is not contained in this preference
      • getAlternatives

        ImmutableSet<Alternative> getAlternatives​(int rank)
        Parameters:
        rank - at least 1.
        Returns:
        the Aternative set at this rank. Empty set id there is no alternative at this rank.
        Throws:
        IllegalArgumentException - if rank is less than one.
      • asEquivalenceClasses

        ImmutableList<ImmutableSet<Alternative>> asEquivalenceClasses()
        Returns:
        Same data but in an Immutable list object A set of alternative is strictly prefered to next sets. All the alternatives in a set are considered ex-aequo.