Class NameCompletionTable

  • All Implemented Interfaces:
    NameCompletion


    public class NameCompletionTable
    extends java.util.ArrayList
    implements NameCompletion
    NameCompletionTable is a utility that implements simple name completion for a collection of names, NameSources, and other NameCompletionTables. This implementation uses a trivial linear search and comparison...
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(NameCompletionTable table)
      Add a NameCompletionTable, which is more optimized than the more general NameSource
      void add​(NameSource source)
      Add a NameSource which is monitored for names.
      java.lang.String[] completeName​(java.lang.String part)  
      protected void getMatchingNames​(java.lang.String part, java.util.List found)
      Add any matching names to list (including any from other tables)
      java.lang.String[] getTip​(java.lang.String part)  
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.util.AbstractList

        equals, hashCode
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from interface java.util.Collection

        parallelStream, stream
      • Methods inherited from interface java.util.List

        containsAll, equals, hashCode, of, of, of, of, of, of, of, of, of, of, of, of
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NameCompletionTable

        public NameCompletionTable​()
    • Method Detail

      • add

        public void add​(NameCompletionTable table)
        Add a NameCompletionTable, which is more optimized than the more general NameSource
      • add

        public void add​(NameSource source)
        Add a NameSource which is monitored for names. Unimplemented - behavior is broken... no updates
      • getMatchingNames

        protected void getMatchingNames​(java.lang.String part,
                                        java.util.List found)
        Add any matching names to list (including any from other tables)
      • getTip

        public java.lang.String[] getTip​(java.lang.String part)
        Specified by:
        getTip in interface NameCompletion
      • completeName

        public java.lang.String[] completeName​(java.lang.String part)
        Specified by:
        completeName in interface NameCompletion