|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.xmp.options.Options
public abstract class Options
The base class for a collection of 32 flag bits. Individual flags are defined as enum value bit masks. Inheriting classes add convenience accessor methods.
Constructor Summary | |
---|---|
Options()
The default constructor. |
|
Options(int options)
Constructor with the options bit mask. |
Method Summary | |
---|---|
protected void |
assertConsistency(int options)
The inheriting option class can do additional checks on the options. |
void |
clear()
Resets the options. |
boolean |
containsAllOptions(int optionBits)
|
boolean |
containsOneOf(int optionBits)
|
protected abstract String |
defineOptionName(int option)
To be implemeted by inheritants. |
boolean |
equals(Object obj)
|
protected boolean |
getOption(int optionBit)
|
int |
getOptions()
Is friendly to access it during the tests. |
String |
getOptionsString()
Creates a human readable string from the set options. |
protected abstract int |
getValidOptions()
To be implemeted by inheritants. |
int |
hashCode()
|
boolean |
isExactly(int optionBits)
|
void |
setOption(int optionBits,
boolean value)
|
void |
setOptions(int options)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Options()
public Options(int options) throws XMPException
options
- the options bit mask
XMPException
- If the options are not correctMethod Detail |
---|
public void clear()
public boolean isExactly(int optionBits)
optionBits
- an option bitmask
public boolean containsAllOptions(int optionBits)
optionBits
- an option bitmask
public boolean containsOneOf(int optionBits)
optionBits
- an option bitmask
protected boolean getOption(int optionBit)
optionBit
- the binary bit or bits that are requested
public void setOption(int optionBits, boolean value)
optionBits
- the binary bit or bits that shall be set to the given valuevalue
- the boolean value to setpublic int getOptions()
public void setOptions(int options) throws XMPException
options
- The options to set.
XMPException
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String getOptionsString()
true
by their name,
like "option1 | option4".public String toString()
toString
in class Object
protected abstract int getValidOptions()
protected abstract String defineOptionName(int option)
option
- a single, valid option bit.
protected void assertConsistency(int options) throws XMPException
options
- the bitmask to check.
XMPException
- Thrown if the options are not consistent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |