|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.config.PropertyMaps
public class PropertyMaps
Class representing all the variables that can be inserted as variables in external processes.
Field Summary | |
---|---|
protected Map<String,Map<String,DrJavaProperty>> |
_props
Map of property sets. |
protected HashMap<String,Stack<VariableProperty>> |
_variables
|
static Lambda2<DrJavaProperty,PropertyMaps,String> |
GET_CURRENT
A lambda to use the getCurrent() method, which forces an update. |
static Lambda2<DrJavaProperty,PropertyMaps,String> |
GET_LAZY
A lambda to use the getLazy() method, which does not force an update and might be stale. |
static PropertyMaps |
TEMPLATE
Template instance. |
protected static String |
VARIABLES_CATEGORY
|
Constructor Summary | |
---|---|
PropertyMaps()
Create the basic property maps. |
Method Summary | |
---|---|
void |
addVariable(String name,
String value)
Add a variable with the specified name and value, shadowing previous definitions of the variable. |
void |
clearCategory(String category)
Clear the specified category. |
void |
clearVariables()
Clear all user-defined variables. |
PropertyMaps |
clone()
Clone this PropertyMaps object. |
Set<String> |
getCategories()
Return the set of categories. |
Map<String,DrJavaProperty> |
getProperties(String category)
Return the properties in a category. |
DrJavaProperty |
getProperty(String key)
Search through all categories and return the property requested, or null if not found. |
DrJavaProperty |
getProperty(String category,
String name)
Return the property requested, or null if not found. |
void |
removeProperty(DrJavaProperty p)
Remove the specified property. |
void |
removeVariable(String name)
Remove the variable with the specified name, unshadowing previous definitions of the variable. |
DrJavaProperty |
setProperty(String category,
DrJavaProperty p)
Add a property. |
void |
setVariable(String name,
String value)
Mutate the value of a variable with the specified name. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,Map<String,DrJavaProperty>> _props
public static final PropertyMaps TEMPLATE
public static final Lambda2<DrJavaProperty,PropertyMaps,String> GET_LAZY
public static final Lambda2<DrJavaProperty,PropertyMaps,String> GET_CURRENT
protected HashMap<String,Stack<VariableProperty>> _variables
protected static final String VARIABLES_CATEGORY
Constructor Detail |
---|
public PropertyMaps()
Method Detail |
---|
public DrJavaProperty getProperty(String category, String name)
category
- name of the categoryname
- name of the property
IllegalArgumentException
- if category is not known.public DrJavaProperty getProperty(String key)
key
- key of the property
public void removeProperty(DrJavaProperty p)
p
- property to removepublic DrJavaProperty setProperty(String category, DrJavaProperty p)
public void clearCategory(String category)
public Set<String> getCategories()
public Map<String,DrJavaProperty> getProperties(String category)
IllegalArgumentException
- if category is not known.public void clearVariables()
public void addVariable(String name, String value)
name
- name of the variablevalue
- value of the variable
IllegalArgumentException
- if the name is already used for a built-in propertypublic void setVariable(String name, String value)
name
- name of the variablevalue
- new value of the variable
IllegalArgumentException
- if a variable with name does not existpublic void removeVariable(String name)
name
- of the variable
IllegalArgumentException
- if no variable with that name existspublic PropertyMaps clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |