Package ome.formats.importer
Class ImportConfig.Value<T>
- java.lang.Object
-
- ome.formats.importer.ImportConfig.Value<T>
-
- Type Parameters:
T- the kind of value to associate with the key
- Direct Known Subclasses:
ImportConfig.AnnotationListValue,ImportConfig.BoolValue,ImportConfig.DoubleArrayValue,ImportConfig.FileValue,ImportConfig.IntValue,ImportConfig.LongValue,ImportConfig.StrValue
- Enclosing class:
- ImportConfig
public abstract static class ImportConfig.Value<T> extends java.lang.ObjectContainer which thread-safely makes a generic configuration value available, without requiring getters and setters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanempty()protected abstract TfromString(java.lang.String string)Tget()Returns the generic type contained by this holder.voidload()Loads properties from various locations.voidset(T t)Sets the in-memory value, which will get persisted onstore()whenImportConfig.saveAll()is called.voidstore()Stores the current value back to some medium.java.lang.StringtoString()
-
-
-
Method Detail
-
get
public T get()
Returns the generic type contained by this holder. This does not touch the persistent stores, but only accesses the value in-memory.- Returns:
- the held value
-
set
public void set(T t)
Sets the in-memory value, which will get persisted onstore()whenImportConfig.saveAll()is called.- Parameters:
t- the value to hold
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
store
public void store()
Stores the current value back to some medium. In each case, the type-matching source is used except when thePropertiesare used, since this is most likely not a persistent store.
-
load
public void load()
Loads properties from various locations. In order, thePropertiesargument, thePreferenceContext, thePreferences, theIniFileLoader, and finally the default value.
-
empty
public boolean empty()
-
fromString
protected abstract T fromString(java.lang.String string)
-
-