Package writer2latex.api

# Class ComplexOption

java.lang.Object
writer2latex.api.ComplexOption

public class ComplexOption extends 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

Modifier and Type
Method
Description
`void`
`clear()`
Clear the contents of the set
`boolean`
`containsKey(String sName)`
Test if this complex options contains a specific option name
`void`
`copy(String sName, Map<String,String> attributes)`
Define a key using a copy of a the provided attributes.
`void`
`copyAll(ComplexOption co)`
Copy all values from another `ComplexOption` (overwrites existing values)
`Map<String,String>`
`get(String sName)`
Get the value belonging to a key
`Set<String>`
`keySet()`
Get the names of all options that are currently defined by this complex option
`void`
`put(String sName, Map<String,String> attributes)`
Define a key.
`void`
`remove(String sName)`
Remove an option from the set, if it exists

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ComplexOption

public ComplexOption()

## Method Details

### clear

public void clear()
Clear the contents of the set

### remove

public void remove(String sName)
Remove an option from the set, if it exists

Parameters:
  `sName` - the name of the key to remove

### put

public void put(String sName, Map<String,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(String sName, Map<String,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 Map<String,String> get(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 another `ComplexOption` (overwrites existing values)

Parameters:
  `co` - another instance of `ComplexOption`

### keySet

public Set<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(String sName)
Test if this complex options contains a specific option name

Parameters:
  `sName` - the name to test
Returns:
  true if the name exists