public class AutoCompletionPriority extends java.lang.Object implements java.lang.Comparable<AutoCompletionPriority>
gui.tagging.ac.AutoCompletionItemPriority)| Modifier and Type | Field and Description |
|---|---|
private boolean |
inDataSet |
private boolean |
inStandard |
static AutoCompletionPriority |
IS_IN_DATASET
Indicates that this is an arbitrary value from the data set, i.e.
|
static AutoCompletionPriority |
IS_IN_SELECTION
Indicates that this is a value from a selected object.
|
static AutoCompletionPriority |
IS_IN_STANDARD
Indicates that this is a standard value, i.e.
|
static AutoCompletionPriority |
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 AutoCompletionPriority |
UNKNOWN
Unknown priority.
|
private int |
userInput |
| Constructor and Description |
|---|
AutoCompletionPriority(boolean inDataSet,
boolean inStandard,
boolean selected)
Constructs a new
AutoCompletionItemPriority. |
AutoCompletionPriority(boolean inDataSet,
boolean inStandard,
boolean selected,
java.lang.Integer userInput)
Constructs a new
AutoCompletionItemPriority. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AutoCompletionPriority other)
Imposes an ordering on the priorities.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getUserInput()
Returns a number when the tag key / value has been entered by the user before.
|
int |
hashCode() |
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.
|
AutoCompletionPriority |
mergeWith(AutoCompletionPriority other)
Merges two priorities.
|
java.lang.String |
toString() |
public static final AutoCompletionPriority IS_IN_STANDARD_AND_IN_DATASET
public static final AutoCompletionPriority IS_IN_DATASET
public static final AutoCompletionPriority IS_IN_STANDARD
public static final AutoCompletionPriority IS_IN_SELECTION
public static final AutoCompletionPriority 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 AutoCompletionPriority(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 AutoCompletionPriority(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(AutoCompletionPriority other)
compareTo in interface java.lang.Comparable<AutoCompletionPriority>public AutoCompletionPriority mergeWith(AutoCompletionPriority other)
other - other prioritypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object