Class SetComparator<T>

  • Type Parameters:
    T - type of the compared sets' elements
    All Implemented Interfaces:
    java.util.Comparator<java.util.Collection<T>>

    public class SetComparator<T>
    extends java.lang.Object
    implements java.util.Comparator<java.util.Collection<T>>
    Author:
    Nils Geilen A comparator for sets of T according to def.3.19 in Mogdil and Prakken
    • Constructor Summary

      Constructors 
      Constructor Description
      SetComparator​(java.util.Comparator<T> comp, boolean elitist)
      Constructs an new set comparator
    • Method Summary

      Modifier and Type Method Description
      int compare​(java.util.Collection<T> gamma1, java.util.Collection<T> gamma2)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • SetComparator

        public SetComparator​(java.util.Comparator<T> comp,
                             boolean elitist)
        Constructs an new set comparator
        Parameters:
        comp - comparator for single elements
        elitist - elitist or democratic behvaiour
    • Method Detail

      • compare

        public int compare​(java.util.Collection<T> gamma1,
                           java.util.Collection<T> gamma2)
        Specified by:
        compare in interface java.util.Comparator<T>