| Modifier and Type | Field and Description |
|---|---|
private boolean |
changed |
private Setting<?> |
defaultValue |
private boolean |
isDefault |
private java.lang.String |
key |
private Setting<?> |
value |
| Constructor and Description |
|---|
PrefEntry(java.lang.String key,
Setting<?> value,
Setting<?> defaultValue,
boolean isDefault)
Constructs a new
PrefEntry. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PrefEntry other) |
boolean |
equals(java.lang.Object obj) |
Setting<?> |
getDefaultValue()
Returns the preference default value.
|
java.lang.String |
getKey()
Returns the preference key.
|
Setting<?> |
getValue()
Returns the preference value.
|
int |
hashCode() |
boolean |
isChanged()
Determines if this preference entry has been modified.
|
boolean |
isDefault()
Determines if the current value is the default value.
|
void |
markAsChanged()
Marks this preference entry as modified.
|
void |
reset()
Resets this preference entry to default state.
|
void |
setValue(Setting<?> value)
Sets the preference value.
|
java.lang.String |
toString() |
private final java.lang.String key
private final Setting<?> defaultValue
private boolean isDefault
private boolean changed
public PrefEntry(java.lang.String key, Setting<?> value, Setting<?> defaultValue, boolean isDefault)
PrefEntry.key - The preference keyvalue - The preference valuedefaultValue - The preference default valueisDefault - determines if the current value is the default valuepublic java.lang.String getKey()
public Setting<?> getDefaultValue()
public void setValue(Setting<?> value)
value - the preference valuepublic boolean isDefault()
true if the current value is the default value, false otherwisepublic boolean isChanged()
true if this preference entry has been modified, false otherwisepublic void markAsChanged()
public void reset()
public int compareTo(PrefEntry other)
compareTo in interface java.lang.Comparable<PrefEntry>public 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