org.apache.directory.shared.ldap.schema
Class AttributeTypeOptions

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

public class AttributeTypeOptions
extends java.lang.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.

Version:
$Rev: 655151 $
Author:
Apache Directory Project

Constructor Summary
AttributeTypeOptions(AttributeType attributeType)
          Creates a new instance of AttributeTypeOptions, containing an attributeType, but no options.
AttributeTypeOptions(AttributeType attributeType, java.util.Set<java.lang.String> options)
          Creates a new instance of AttributeTypeOptions, containing an attributeType, and options.
 
Method Summary
 void addOption(java.lang.String option)
          Add a new option to the option set for this attributeType.
 void addOptions(java.util.Set<java.lang.String> options)
          Add a set of optionS to the option set for this attributeType.
 AttributeType getAttributeType()
           
 java.util.Set<java.lang.String> getOptions()
           
 boolean hasOption()
           
 boolean hasOption(java.lang.String option)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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,
                            java.util.Set<java.lang.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 java.util.Set<java.lang.String> getOptions()
Returns:
the associated options

hasOption

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

hasOption

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

addOption

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

Parameters:
option - the option to add

addOptions

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

Parameters:
options - the options to add

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.