Package weka.core

Class ClassDiscovery.StringCompare

  • All Implemented Interfaces:
    java.util.Comparator, RevisionHandler
    Enclosing class:
    ClassDiscovery

    public static class ClassDiscovery.StringCompare
    extends java.lang.Object
    implements java.util.Comparator, RevisionHandler
    compares two strings. The following order is used:
    • case insensitive
    • german umlauts (ä , ö etc.) or other non-ASCII letters are treated as special chars
    • special chars < numbers < letters
    • Constructor Summary

      Constructors 
      Constructor Description
      StringCompare()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.Object o1, java.lang.Object o2)
      Compares its two arguments for order.
      boolean equals​(java.lang.Object obj)
      Indicates whether some other object is "equal to" this Comparator.
      java.lang.String getRevision()
      Returns the revision string.
      • Methods inherited from class java.lang.Object

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

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

      • StringCompare

        public StringCompare()
    • Method Detail

      • compare

        public int compare​(java.lang.Object o1,
                           java.lang.Object o2)
        Compares its two arguments for order.
        Specified by:
        compare in interface java.util.Comparator
        Parameters:
        o1 - the first object
        o2 - the second object
        Returns:
        -1 if o1<o2, 0 if o1=o2 and 1 if o1&;gt;o2
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this Comparator.
        Specified by:
        equals in interface java.util.Comparator
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to compare with this Comparator
        Returns:
        true if the object is a StringCompare object as well
      • getRevision

        public java.lang.String getRevision()
        Returns the revision string.
        Specified by:
        getRevision in interface RevisionHandler
        Returns:
        the revision