org.apache.directory.api.ldap.model.schema
Class AttributeTypeOptions

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.AttributeTypeOptions

public class AttributeTypeOptions
extends Object

An structure containing a couple of attributeType and options. A search request can contain a list of attribute to return, those attribute could be associated with options. Those options are stored into a Set.

Author:
Apache Directory Project

Constructor Summary
AttributeTypeOptions(AttributeType attributeType)
          Creates a new instance of AttributeTypeOptions, containing an attributeType, but no options.
AttributeTypeOptions(AttributeType attributeType, Set<String> options)
          Creates a new instance of AttributeTypeOptions, containing an attributeType, and options.
 
Method Summary
 void addOption(String option)
          Add a new option to the option set for this attributeType.
 void addOptions(Set<String> optionsToAdd)
          Add a set of optionS to the option set for this attributeType.
 boolean equals(Object o)
           
 AttributeType getAttributeType()
           
 Set<String> getOptions()
           
 int hashCode()
           
 boolean hasOption()
           
 boolean hasOption(String option)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeTypeOptions

public AttributeTypeOptions(AttributeType attributeType)
Creates a new instance of AttributeTypeOptions, containing an attributeType, but no options.

Parameters:
attributeType - The associated AttributeType

AttributeTypeOptions

public AttributeTypeOptions(AttributeType attributeType,
                            Set<String> options)
Creates a new instance of AttributeTypeOptions, containing an attributeType, and options.

Parameters:
attributeType - the associated AttributeType
options - the associated options
Method Detail

getAttributeType

public AttributeType getAttributeType()
Returns:
the inner attributeType

getOptions

public Set<String> getOptions()
Returns:
the associated options

hasOption

public boolean hasOption()
Returns:
true if the attributeType has at least one option

hasOption

public boolean hasOption(String option)
Parameters:
option - the option to check
Returns:
true if the attributeType has the given option

addOption

public void addOption(String option)
Add a new option to the option set for this attributeType.

Parameters:
option - the option to add

addOptions

public void addOptions(Set<String> optionsToAdd)
Add a set of optionS to the option set for this attributeType.

Parameters:
optionsToAdd - the options to add

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.