aicas logo Jamaica 3.4 release 8

javax.naming.directory
Class BasicAttribute

java.lang.Object
  extended by javax.naming.directory.BasicAttribute
All Implemented Interfaces:
Serializable, Cloneable, Attribute

public class BasicAttribute
extends Object
implements Attribute

Since:
1.3
See Also:
Serialized Form
Date:
June 20, 2001

Field Summary
protected  String attrID
          The ID of this attribute.
protected  boolean ordered
          True if this attribute's values are ordered.
protected  Vector values
          Values for this attribute.
 
Constructor Summary
BasicAttribute(String id)
           
BasicAttribute(String id, boolean ordered)
           
BasicAttribute(String id, Object value)
           
BasicAttribute(String id, Object value, boolean ordered)
           
 
Method Summary
 void add(int index, Object val)
           
 boolean add(Object val)
           
 void clear()
           
 Object clone()
          clone creates a shallow clone of this.
 boolean contains(Object val)
           
 boolean equals(Object obj)
          equals compares this object to another object.
 Object get()
           
 Object get(int index)
           
 NamingEnumeration getAll()
           
 DirContext getAttributeDefinition()
           
 DirContext getAttributeSyntaxDefinition()
           
 String getID()
           
 int hashCode()
          hashCode returns a hash code for this object.
 boolean isOrdered()
           
 Object remove(int index)
           
 boolean remove(Object val)
           
 Object set(int index, Object val)
           
 int size()
           
 String toString()
          toString creates a printable string that represents this object for debugging purposes.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

attrID

protected String attrID
The ID of this attribute.


ordered

protected boolean ordered
True if this attribute's values are ordered.


values

protected transient Vector values
Values for this attribute.

Constructor Detail

BasicAttribute

public BasicAttribute(String id)

BasicAttribute

public BasicAttribute(String id,
                      boolean ordered)

BasicAttribute

public BasicAttribute(String id,
                      Object value)

BasicAttribute

public BasicAttribute(String id,
                      Object value,
                      boolean ordered)
Method Detail

add

public void add(int index,
                Object val)
Specified by:
add in interface Attribute

add

public boolean add(Object val)
Specified by:
add in interface Attribute

clear

public void clear()
Specified by:
clear in interface Attribute

clone

public Object clone()
Description copied from class: Object
clone creates a shallow clone of this.

Specified by:
clone in interface Attribute
Overrides:
clone in class Object
Returns:
a clone of this object.

contains

public boolean contains(Object val)
Specified by:
contains in interface Attribute

equals

public boolean equals(Object obj)
Description copied from class: Object
equals compares this object to another object.

Equals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.

If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.

The default implementation of equals returns this==other.

Overrides:
equals in class Object
Parameters:
obj - the other object.
Returns:
if this and other are considered equal.

get

public Object get()
           throws NamingException
Specified by:
get in interface Attribute
Throws:
NamingException

get

public Object get(int index)
           throws NamingException
Specified by:
get in interface Attribute
Throws:
NamingException

getAll

public NamingEnumeration getAll()
                         throws NamingException
Specified by:
getAll in interface Attribute
Throws:
NamingException

getAttributeDefinition

public DirContext getAttributeDefinition()
                                  throws OperationNotSupportedException,
                                         NamingException
Specified by:
getAttributeDefinition in interface Attribute
Throws:
OperationNotSupportedException
NamingException

getAttributeSyntaxDefinition

public DirContext getAttributeSyntaxDefinition()
                                        throws OperationNotSupportedException,
                                               NamingException
Specified by:
getAttributeSyntaxDefinition in interface Attribute
Throws:
OperationNotSupportedException
NamingException

getID

public String getID()
Specified by:
getID in interface Attribute

hashCode

public int hashCode()
Description copied from class: Object
hashCode returns a hash code for this object. The hash code must be equal for two objects a and b if a.equals(b) is true.

The default implementation returns System.identityHashCode(this).

Overrides:
hashCode in class Object
Returns:
a hash code value.

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in interface Attribute

remove

public Object remove(int index)
Specified by:
remove in interface Attribute

remove

public boolean remove(Object val)
Specified by:
remove in interface Attribute

set

public Object set(int index,
                  Object val)
Specified by:
set in interface Attribute

size

public int size()
Specified by:
size in interface Attribute

toString

public String toString()
Description copied from class: Object
toString creates a printable string that represents this object for debugging purposes.

The default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).

Overrides:
toString in class Object
Returns:
a string identifying this object.

aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.