Class MSort

    • Field Detail

      • index

        public int index
        Direct access index
      • data

        public Object data
        The data
    • Constructor Detail

      • MSort

        public MSort​(int new_index,
                     Object new_data)
        Constructor - Sort Entity
        Parameters:
        new_index - index
        new_data - data
    • Method Detail

      • setSortAsc

        public void setSortAsc​(boolean ascending)
        Sort Ascending
        Parameters:
        ascending - if true sort ascending
      • compare

        public int compare​(Object o1,
                           Object o2)
        Compare Data of two entities
        Specified by:
        compare in interface Comparator<Object>
        Parameters:
        o1 - object
        o2 - object
        Returns:
        comparator
      • equals

        public boolean equals​(Object obj)
        Equal (based on data, ignores index)
        Specified by:
        equals in interface Comparator<Object>
        Overrides:
        equals in class Object
        Parameters:
        obj - object
        Returns:
        true if equal
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class Object
        Returns:
        info