public class AutoCompletionItemPriority extends java.lang.Object implements java.lang.Comparable<AutoCompletionItemPriority>
| Modifier and Type | Field and Description |
|---|---|
private boolean |
inDataSet |
private boolean |
inStandard |
static AutoCompletionItemPriority |
IS_IN_DATASET
Indicates that this is an arbitrary value from the data set, i.e.
|
static AutoCompletionItemPriority |
IS_IN_SELECTION
Indicates that this is a value from a selected object.
|
static AutoCompletionItemPriority |
IS_IN_STANDARD
Indicates that this is a standard value, i.e.
|
static AutoCompletionItemPriority |
IS_IN_STANDARD_AND_IN_DATASET
Indicates, that the value is standard and it is found in the data.
|
private static int |
NO_USER_INPUT |
private boolean |
selected |
static AutoCompletionItemPriority |
UNKNOWN
Unknown priority.
|
private int |
userInput |
| Constructor and Description |
|---|
AutoCompletionItemPriority(boolean inDataSet,
boolean inStandard,
boolean selected)
Constructs a new
AutoCompletionItemPriority. |
AutoCompletionItemPriority(boolean inDataSet,
boolean inStandard,
boolean selected,
java.lang.Integer userInput)
Constructs a new
AutoCompletionItemPriority. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AutoCompletionItemPriority other)
Imposes an ordering on the priorities.
|
java.lang.Integer |
getUserInput()
Returns a number when the tag key / value has been entered by the user before.
|
boolean |
isInDataSet()
Determines if the item is found in the currently active data layer.
|
boolean |
isInStandard()
Determines if the item is a standard tag, e.g.
|
boolean |
isSelected()
Determines if it is found on an object that is currently selected.
|
AutoCompletionItemPriority |
mergeWith(AutoCompletionItemPriority other)
Merges two priorities.
|
java.lang.String |
toString() |
public static final AutoCompletionItemPriority IS_IN_STANDARD_AND_IN_DATASET
public static final AutoCompletionItemPriority IS_IN_DATASET
public static final AutoCompletionItemPriority IS_IN_STANDARD
public static final AutoCompletionItemPriority IS_IN_SELECTION
public static final AutoCompletionItemPriority UNKNOWN
private static final int NO_USER_INPUT
private final int userInput
private final boolean inDataSet
private final boolean inStandard
private final boolean selected
public AutoCompletionItemPriority(boolean inDataSet, boolean inStandard, boolean selected, java.lang.Integer userInput)
AutoCompletionItemPriority.inDataSet - true, if the item is found in the currently active data layerinStandard - true, if the item is a standard tag, e.g. from the presetsselected - true, if it is found on an object that is currently selecteduserInput - null, if the user hasn't entered this tag so far. A number when
the tag key / value has been entered by the user before. A lower number means
this happened more recently and beats a higher number in priority.public AutoCompletionItemPriority(boolean inDataSet, boolean inStandard, boolean selected)
AutoCompletionItemPriority.inDataSet - true, if the item is found in the currently active data layerinStandard - true, if the item is a standard tag, e.g. from the presetsselected - true, if it is found on an object that is currently selectedpublic boolean isInDataSet()
true if the item is found in the currently active data layerpublic boolean isInStandard()
true if the item is a standard tag, e.g. from the presetspublic boolean isSelected()
true if it is found on an object that is currently selectedpublic java.lang.Integer getUserInput()
null, if the user hasn't entered this tag so far.public int compareTo(AutoCompletionItemPriority other)
compareTo in interface java.lang.Comparable<AutoCompletionItemPriority>public AutoCompletionItemPriority mergeWith(AutoCompletionItemPriority other)
other - other prioritypublic java.lang.String toString()
toString in class java.lang.Object