Class FuzzyList<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>

    public class FuzzyList<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>
    A list-like object that performs fuzzy sorting on the edit distance of strings. The constructor takes the pattern String (user input), then you can add-by-string-key any number of objects of type T. The score for each String is used to sort entries which contain source object and string key. This can allow you to, for example, sort methods based on distance to a user-entered search query.
    • Constructor Summary

      Constructors 
      Constructor Description
      FuzzyList​(java.lang.String key)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, T item)  
      java.util.Iterator<T> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • FuzzyList

        public FuzzyList​(java.lang.String key)
    • Method Detail

      • add

        public void add​(java.lang.String key,
                        T item)
      • iterator

        @NotNull
        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>