Class AutoCompleterItem


  • public class AutoCompleterItem
    extends java.lang.Object
    A class to represent an item available for auto-completion. Upon confirming the selection, the item's payload will be inserted into the translation.

    Additional information such as comments, source terms, etc. can be stored in extras. The AutoCompleterListView that created the AutoCompleterItem should know how to use these values appropriately in its AutoCompleterListView.itemToString(AutoCompleterItem) method.

    • Constructor Summary

      Constructors 
      Constructor Description
      AutoCompleterItem​(java.lang.String payload, java.lang.String[] extras, int replacementLength)  
      AutoCompleterItem​(java.lang.String payload, java.lang.String[] extras, int cursorAdjust, boolean keepSelection, int replacementLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • payload

        public final java.lang.String payload
      • extras

        public final java.lang.String[] extras
      • cursorAdjust

        public final int cursorAdjust
      • keepSelection

        public final boolean keepSelection
      • replacementLength

        public final int replacementLength
    • Constructor Detail

      • AutoCompleterItem

        public AutoCompleterItem​(java.lang.String payload,
                                 java.lang.String[] extras,
                                 int replacementLength)
      • AutoCompleterItem

        public AutoCompleterItem​(java.lang.String payload,
                                 java.lang.String[] extras,
                                 int cursorAdjust,
                                 boolean keepSelection,
                                 int replacementLength)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object