ome.formats.importer
Class ImportConfig.Value<T>

java.lang.Object
  extended by ome.formats.importer.ImportConfig.Value<T>
Type Parameters:
T -
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 Object

Container which thread-safely makes a generic configuration value available, without requiring getters and setters.


Method Summary
 boolean empty()
           
protected abstract  T fromString(String string)
           
 T get()
          Returns the generic type contained by this holder.
 void load()
          Loads properties from various locations.
 void set(T t)
          Sets the in-memory value, which will get persisted on store() when ImportConfig.saveAll() is called.
 void store()
          Stores the current value back to some medium.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.


set

public void set(T t)
Sets the in-memory value, which will get persisted on store() when ImportConfig.saveAll() is called.


toString

public String toString()
Overrides:
toString in class Object

store

public void store()
Stores the current value back to some medium. The decision of which medium is based on the current value of which. In each case, the type-matching source is used except when the Properties are used, since this is most likely not a persistent store.


load

public void load()
Loads properties from various locations. In order, the Properties argument, the PreferenceContext, the Preferences, the IniFileLoader, and finally the default value.


empty

public boolean empty()

fromString

protected abstract T fromString(String string)


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.