Package digilib.util
Class OptionsSet
- java.lang.Object
-
- digilib.util.OptionsSet
-
public class OptionsSet extends Object
- Author:
- casties
-
-
Constructor Summary
Constructors Constructor Description OptionsSet()
OptionsSet(String s)
Constructor with String of options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumSet<DigilibOption>
getOptions()
String
getOptionSep()
boolean
hasOption(DigilibOption opt)
Return if the option opt is set.void
parseString(String s)
Adds all options from String to Set.boolean
setOption(DigilibOption opt)
Set the option opt.void
setOptions(EnumSet<DigilibOption> options)
void
setOptionSep(String optionSep)
String
toString()
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
logger
-
optionSep
protected String optionSep
String separating options in a String.
-
-
Constructor Detail
-
OptionsSet
public OptionsSet()
-
OptionsSet
public OptionsSet(String s)
Constructor with String of options.- Parameters:
s
- the options string
-
-
Method Detail
-
parseString
public void parseString(String s)
Adds all options from String to Set.- Parameters:
s
- the options string
-
setOption
public boolean setOption(DigilibOption opt)
Set the option opt.- Parameters:
opt
- the DigilibOption- Returns:
- if changed
-
hasOption
public boolean hasOption(DigilibOption opt)
Return if the option opt is set.- Parameters:
opt
- the DigilibOption- Returns:
- if option is set
-
getOptions
public EnumSet<DigilibOption> getOptions()
- Returns:
- the options
-
setOptions
public void setOptions(EnumSet<DigilibOption> options)
- Parameters:
options
- the options to set
-
getOptionSep
public String getOptionSep()
- Returns:
- the option separator
-
setOptionSep
public void setOptionSep(String optionSep)
- Parameters:
optionSep
- the option separator
-
-