public abstract class Options extends Object
Constructor and Description |
---|
Options()
The default constructor.
|
Options(int options)
Constructor with the options bit mask.
|
Modifier and Type | Method and Description |
---|---|
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() |
public Options()
public Options(int options) throws XMPException
options
- the options bit mask
XMPException
- If the options are not correct
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 value
value
- the boolean value to set
public int getOptions()
public void setOptions(int options) throws XMPException
options
- The options to set.
XMPException
- thrown if the file is not well-formed XML or if the parsing fails
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()
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.
Copyright © 1998–2023 iText Group NV. All rights reserved.