Package writer2latex.api
Class ComplexOption
- java.lang.Object
-
- writer2latex.api.ComplexOption
-
public class ComplexOption extends java.lang.Object
A complex option is a set of named keys, each pointing to a set of named attributes
-
-
Constructor Summary
Constructors Constructor Description ComplexOption()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the contents of the setboolean
containsKey(java.lang.String sName)
Test if this complex options contains a specific option namevoid
copy(java.lang.String sName, java.util.Map<java.lang.String,java.lang.String> attributes)
Define a key using a copy of a the provided attributes.void
copyAll(ComplexOption co)
Copy all values from anotherComplexOption
(overwrites existing values)java.util.Map<java.lang.String,java.lang.String>
get(java.lang.String sName)
Get the value belonging to a keyjava.util.Set<java.lang.String>
keySet()
Get the names of all options that are currently defined by this complex optionvoid
put(java.lang.String sName, java.util.Map<java.lang.String,java.lang.String> attributes)
Define a key.void
remove(java.lang.String sName)
Remove an option from the set, if it exists
-
-
-
Method Detail
-
clear
public void clear()
Clear the contents of the set
-
remove
public void remove(java.lang.String sName)
Remove an option from the set, if it exists- Parameters:
sName
- the name of the key to remove
-
put
public void put(java.lang.String sName, java.util.Map<java.lang.String,java.lang.String> attributes)
Define a key. If the key already exists, the old value will be replaced- Parameters:
sName
- the name of the key. The name must be non-empty, otherwise the request will be ignored.attributes
-
-
copy
public void copy(java.lang.String sName, java.util.Map<java.lang.String,java.lang.String> attributes)
Define a key using a copy of a the provided attributes. If the key already exists, the old value will be replaced- Parameters:
sName
- the name of the key. The name must be non-empty, otherwise the request will be ignored.attributes
-
-
get
public java.util.Map<java.lang.String,java.lang.String> get(java.lang.String sName)
Get the value belonging to a key- Parameters:
sName
- the name of the key- Returns:
- the attributes, or null if the option doesn't exist
-
copyAll
public void copyAll(ComplexOption co)
Copy all values from anotherComplexOption
(overwrites existing values)- Parameters:
co
- another instance ofComplexOption
-
keySet
public java.util.Set<java.lang.String> keySet()
Get the names of all options that are currently defined by this complex option- Returns:
- all names as a
Set
-
containsKey
public boolean containsKey(java.lang.String sName)
Test if this complex options contains a specific option name- Parameters:
sName
- the name to test- Returns:
- true if the name exists
-
-