Package com.adobe.internal.xmp.options
Class Options
- java.lang.Object
 - 
- com.adobe.internal.xmp.options.Options
 
 
- 
- Direct Known Subclasses:
 AliasOptions,IteratorOptions,ParseOptions,PropertyOptions,SerializeOptions,TemplateOptions
public abstract class Options extends java.lang.ObjectThe base class for a collection of 32 flag bits. Individual flags are defined as enum value bit masks. Inheriting classes add convenience accessor methods. FfF: In Java 1.5 this class can replace by an enum set.- Since:
 - 24.01.2006
 
 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Resets the options.booleancontainsAllOptions(int optionBits)booleancontainsOneOf(int optionBits)booleanequals(java.lang.Object obj)intgetOptions()Is friendly to access it during the tests.java.lang.StringgetOptionsString()Creates a human readable string from the set options.inthashCode()booleanisExactly(int optionBits)voidsetOption(int optionBits, boolean value)voidsetOptions(int options)java.lang.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
Options
public Options()
The default constructor. 
- 
Options
public Options(int options) throws XMPExceptionConstructor with the options bit mask.- Parameters:
 options- the options bit mask- Throws:
 XMPException- If the options are not correct
 
 - 
 
- 
Method Detail
- 
clear
public void clear()
Resets the options. 
- 
isExactly
public boolean isExactly(int optionBits)
- Parameters:
 optionBits- an option bitmask- Returns:
 - Returns true, if this object is equal to the given options.
 
 
- 
containsAllOptions
public boolean containsAllOptions(int optionBits)
- Parameters:
 optionBits- an option bitmask- Returns:
 - Returns true, if this object contains all given options.
 
 
- 
containsOneOf
public boolean containsOneOf(int optionBits)
- Parameters:
 optionBits- an option bitmask- Returns:
 - Returns true, if this object contain at least one of the given options.
 
 
- 
setOption
public void setOption(int optionBits, boolean value)- Parameters:
 optionBits- the binary bit or bits that shall be set to the given valuevalue- the boolean value to set
 
- 
getOptions
public int getOptions()
Is friendly to access it during the tests.- Returns:
 - Returns the options.
 
 
- 
setOptions
public void setOptions(int options) throws XMPException- Parameters:
 options- The options to set.- Throws:
 XMPException- If the options are not correct
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object- See Also:
 Object.equals(Object)
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object- See Also:
 Object.hashCode()
 
- 
getOptionsString
public java.lang.String getOptionsString()
Creates a human readable string from the set options. Note: This method is quite expensive and should only be used within tests or as- Returns:
 - Returns a String listing all options that are set to 
trueby their name, like "option1 | option4". 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object- Returns:
 - Returns the options as hex bitmask.
 
 
 - 
 
 -