edu.mit.csail.sdg.alloy4
Class Util.StringPref

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4.Util.StringPref
Enclosing class:
Util

public static final class Util.StringPref
extends java.lang.Object

This reads and writes String-valued Java persistent preferences.

Thread Safety: Safe.


Constructor Summary
Util.StringPref(java.lang.String id)
          Constructs a new StringPref object with the given id.
Util.StringPref(java.lang.String id, java.lang.String defaultValue)
          Constructs a new StringPref object with the given id and the given default value.
 
Method Summary
 java.lang.String get()
          Reads the value for this preference; if not set or is empty, we return the default value.
 void set(java.lang.String value)
          Sets the value for this preference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util.StringPref

public Util.StringPref(java.lang.String id)
Constructs a new StringPref object with the given id.


Util.StringPref

public Util.StringPref(java.lang.String id,
                       java.lang.String defaultValue)
Constructs a new StringPref object with the given id and the given default value.

Method Detail

set

public void set(java.lang.String value)
Sets the value for this preference.


get

public java.lang.String get()
Reads the value for this preference; if not set or is empty, we return the default value.