Java Doc for BasicAttributes.java in  » 6.0-JDK-Core » naming » javax » naming » directory » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » naming » javax.naming.directory 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.naming.directory.BasicAttributes

BasicAttributes
public class BasicAttributes implements Attributes(Code)
This class provides a basic implementation of the Attributes interface.

BasicAttributes is either case-sensitive or case-insensitive (case-ignore). This property is determined at the time the BasicAttributes constructor is called. In a case-insensitive BasicAttributes, the case of its attribute identifiers is ignored when searching for an attribute, or adding attributes. In a case-sensitive BasicAttributes, the case is significant.

When the BasicAttributes class needs to create an Attribute, it uses BasicAttribute. There is no other dependency on BasicAttribute.

Note that updates to BasicAttributes (such as adding or removing an attribute) does not affect the corresponding representation in the directory. Updates to the directory can only be effected using operations in the DirContext interface.

A BasicAttributes instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single BasicAttributes instance should lock the object.
author:
   Rosanna Lee
author:
   Scott Seligman
version:
   1.19 07/05/05
See Also:   DirContext.getAttributes
See Also:   DirContext.modifyAttributes
See Also:   DirContext.bind
See Also:   DirContext.rebind
See Also:   DirContext.createSubcontext
See Also:   DirContext.search
since:
   1.3


Inner Class :class AttrEnumImpl implements NamingEnumeration<Attribute>
Inner Class :class IDEnumImpl implements NamingEnumeration<String>

Field Summary
transient  Hashtableattrs
    

Constructor Summary
public  BasicAttributes()
     Constructs a new instance of Attributes.
public  BasicAttributes(boolean ignoreCase)
     Constructs a new instance of Attributes.
public  BasicAttributes(String attrID, Object val)
     Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. The character case of attribute identifiers is significant when subsequently retrieving or adding attributes.
Parameters:
  attrID - non-null The id of the attribute to add.
Parameters:
  val - The value of the attribute to add.
public  BasicAttributes(String attrID, Object val, boolean ignoreCase)
     Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. If ignoreCase is true, the character case of attribute identifiers is ignored; otherwise the case is significant.
Parameters:
  attrID - non-null The id of the attribute to add.If this attribute set ignores the charactercase of its attribute ids, the case of attrIDis ignored.
Parameters:
  val - The value of the attribute to add.

Method Summary
public  Objectclone()
    
public  booleanequals(Object obj)
     Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes.
public  Attributeget(String attrID)
    
public  NamingEnumeration<Attribute>getAll()
    
public  NamingEnumeration<String>getIDs()
    
public  inthashCode()
     Calculates the hash code of this BasicAttributes.

The hash code is computed by adding the hash code of the attributes of this object.

public  booleanisCaseIgnored()
    
public  Attributeput(String attrID, Object val)
    
public  Attributeput(Attribute attr)
    
public  Attributeremove(String attrID)
    
public  intsize()
    
public  StringtoString()
     Generates the string representation of this attribute set. The string consists of each attribute identifier and the contents of each attribute.

Field Detail
attrs
transient Hashtable attrs(Code)




Constructor Detail
BasicAttributes
public BasicAttributes()(Code)
Constructs a new instance of Attributes. The character case of attribute identifiers is significant when subsequently retrieving or adding attributes.



BasicAttributes
public BasicAttributes(boolean ignoreCase)(Code)
Constructs a new instance of Attributes. If ignoreCase is true, the character case of attribute identifiers is ignored; otherwise the case is significant.
Parameters:
  ignoreCase - true means this attribute set will ignorethe case of its attribute identifierswhen retrieving or adding attributes;false means case is respected.



BasicAttributes
public BasicAttributes(String attrID, Object val)(Code)
Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. The character case of attribute identifiers is significant when subsequently retrieving or adding attributes.
Parameters:
  attrID - non-null The id of the attribute to add.
Parameters:
  val - The value of the attribute to add. If null, a nullvalue is added to the attribute.



BasicAttributes
public BasicAttributes(String attrID, Object val, boolean ignoreCase)(Code)
Constructs a new instance of Attributes with one attribute. The attribute specified by attrID and val are added to the newly created attribute. If ignoreCase is true, the character case of attribute identifiers is ignored; otherwise the case is significant.
Parameters:
  attrID - non-null The id of the attribute to add.If this attribute set ignores the charactercase of its attribute ids, the case of attrIDis ignored.
Parameters:
  val - The value of the attribute to add. If null, a nullvalue is added to the attribute.
Parameters:
  ignoreCase - true means this attribute set will ignorethe case of its attribute identifierswhen retrieving or adding attributes;false means case is respected.




Method Detail
clone
public Object clone()(Code)



equals
public boolean equals(Object obj)(Code)
Determines whether this BasicAttributes is equal to another Attributes Two Attributes are equal if they are both instances of Attributes, treat the case of attribute IDs the same way, and contain the same attributes. Each Attribute in this BasicAttributes is checked for equality using Object.equals(), which may have be overridden by implementations of Attribute). If a subclass overrides equals(), it should override hashCode() as well so that two Attributes instances that are equal have the same hash code.
Parameters:
  obj - the possibly null object to compare against. true If obj is equal to this BasicAttributes.
See Also:   BasicAttributes.hashCode



get
public Attribute get(String attrID)(Code)



getAll
public NamingEnumeration<Attribute> getAll()(Code)



getIDs
public NamingEnumeration<String> getIDs()(Code)



hashCode
public int hashCode()(Code)
Calculates the hash code of this BasicAttributes.

The hash code is computed by adding the hash code of the attributes of this object. If this BasicAttributes ignores case of its attribute IDs, one is added to the hash code. If a subclass overrides hashCode(), it should override equals() as well so that two Attributes instances that are equal have the same hash code. an int representing the hash code of this BasicAttributes instance.
See Also:   BasicAttributes.equals




isCaseIgnored
public boolean isCaseIgnored()(Code)



put
public Attribute put(String attrID, Object val)(Code)



put
public Attribute put(Attribute attr)(Code)



remove
public Attribute remove(String attrID)(Code)



size
public int size()(Code)



toString
public String toString()(Code)
Generates the string representation of this attribute set. The string consists of each attribute identifier and the contents of each attribute. The contents of this string is useful for debugging and is not meant to be interpreted programmatically. A non-null string listing the contents of this attribute set.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.