Java Doc for BasicAttribute.java in  » Apache-Harmony-Java-SE » javax-package » javax » naming » directory » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » javax package » javax.naming.directory 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.naming.directory.BasicAttribute

BasicAttribute
public class BasicAttribute implements Attribute(Code)
A simple attribute of a directory entry.

A basic attribute does not have any schema associated with it, and attempts to get the schema result in an OperationNotSupportedException being thrown.

The definition of equals for an attribute is simply Object.equals on the value, except for values that are collections where the definition of equals is an equivalence test (i.e. the collection contains the same number of elements, and each has an equal element in the other collection). For an array, Object.equals is used on each array element.

Note that updates to a basic attribute do not update the directory itself -- updates to a directory are only possible through the DirContext interface. BasicAttribute does not get its values dynamically from the directory. It uses the values passed to the constructor or add and remove methods.


See Also:   Attribute


Field Summary
protected  StringattrID
     The attribute identifier.
protected  booleanordered
     Flag showing whether the values of the attribute are ordered.
final static  longserialVersionUID
    
protected transient  Vector<Object>values
     Vector containing the attribute's values.

Constructor Summary
public  BasicAttribute(String id)
     Constructs an unordered BasicAttribute instance with the supplied identifier and no values.
public  BasicAttribute(String id, boolean flag)
     Constructs a BasicAttribute instance with the supplied identifier and no values.
public  BasicAttribute(String id, Object val)
     Constructs an unordered BasicAttribute instance with the supplied identifier and one value.
public  BasicAttribute(String id, Object val, boolean flag)
     Constructs a BasicAttribute instance with the supplied identifier and one value.

Method Summary
public  voidadd(int index, Object val)
    
public  booleanadd(Object val)
    
public  voidclear()
    
public  Objectclone()
    
public  booleancontains(Object val)
    
public  booleanequals(Object obj)
     Returns true if this BasicAttribute instance is equal to the supplied object obj.
public  Objectget()
    
public  Objectget(int index)
    
public  NamingEnumerationgetAll()
    
public  DirContextgetAttributeDefinition()
    
public  DirContextgetAttributeSyntaxDefinition()
    
public  StringgetID()
    
public  inthashCode()
     Returns the hashcode for this BasicAttribute instance.
public  booleanisOrdered()
    
public  Objectremove(int index)
    
public  booleanremove(Object val)
    
public  Objectset(int index, Object val)
    
public  intsize()
    
public  StringtoString()
     Returns the string representation of this BasicAttribute instance.

Field Detail
attrID
protected String attrID(Code)
The attribute identifier. It is initialized by the public constructors and is required to be not null.



ordered
protected boolean ordered(Code)
Flag showing whether the values of the attribute are ordered.



serialVersionUID
final static long serialVersionUID(Code)



values
protected transient Vector<Object> values(Code)
Vector containing the attribute's values. This is initialized by the public constructor and is required to be not null.




Constructor Detail
BasicAttribute
public BasicAttribute(String id)(Code)
Constructs an unordered BasicAttribute instance with the supplied identifier and no values.
Parameters:
  id - the attribute ID



BasicAttribute
public BasicAttribute(String id, boolean flag)(Code)
Constructs a BasicAttribute instance with the supplied identifier and no values. The supplied flag controls whether the values will be ordered or not.
Parameters:
  id - the attribute ID
Parameters:
  flag - Indicates whether the values are ordered or not.



BasicAttribute
public BasicAttribute(String id, Object val)(Code)
Constructs an unordered BasicAttribute instance with the supplied identifier and one value.
Parameters:
  id - the attribute ID
Parameters:
  val - the first attribute value



BasicAttribute
public BasicAttribute(String id, Object val, boolean flag)(Code)
Constructs a BasicAttribute instance with the supplied identifier and one value. The supplied flag controls whether the values will be ordered or not.
Parameters:
  id - the attribute ID
Parameters:
  val - the first attribute value
Parameters:
  flag - Indicates whether the values are ordered or not.




Method Detail
add
public void add(int index, Object val)(Code)



add
public boolean add(Object val)(Code)



clear
public void clear()(Code)



clone
public Object clone()(Code)



contains
public boolean contains(Object val)(Code)



equals
public boolean equals(Object obj)(Code)
Returns true if this BasicAttribute instance is equal to the supplied object obj. Two attributes are considered equal if they have equal identifiers, schemas and values. BasicAttribute uses no schema.

Object.equals is used to test equality of identifiers and values. For array values Object.equals is called on every array element.


Parameters:
  obj - the object to be compared with true if this object is equal to obj, otherwisefalse



get
public Object get() throws NamingException(Code)



get
public Object get(int index) throws NamingException(Code)



getAll
public NamingEnumeration getAll() throws NamingException(Code)



getAttributeDefinition
public DirContext getAttributeDefinition() throws NamingException(Code)



getAttributeSyntaxDefinition
public DirContext getAttributeSyntaxDefinition() throws NamingException(Code)



getID
public String getID()(Code)



hashCode
public int hashCode()(Code)
Returns the hashcode for this BasicAttribute instance. The result is calculated by summing the hashcodes for the identifier and each of the values, except for array values, where the hashcodes for each array element are summed. the hashcode of this BasicAttribute instance



isOrdered
public boolean isOrdered()(Code)



remove
public Object remove(int index)(Code)



remove
public boolean remove(Object val)(Code)



set
public Object set(int index, Object val)(Code)



size
public int size()(Code)



toString
public String toString()(Code)
Returns the string representation of this BasicAttribute instance. The result contains the ID and the string representation of each value. the string representation of this object



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.