38 |
|
|
39 |
package javax.naming.directory; |
package javax.naming.directory; |
40 |
|
|
41 |
import javax.naming.*; |
import java.util.NoSuchElementException; |
42 |
import java.util.*; |
import java.util.Vector; |
43 |
|
import javax.naming.NamingEnumeration; |
44 |
|
import javax.naming.NamingException; |
45 |
|
import javax.naming.OperationNotSupportedException; |
46 |
|
|
47 |
/** |
/** |
48 |
* @author Tom Tromey <tromey@redhat.com> |
* @author Tom Tromey <tromey@redhat.com> |
50 |
*/ |
*/ |
51 |
public class BasicAttribute implements Attribute |
public class BasicAttribute implements Attribute |
52 |
{ |
{ |
53 |
|
private static final long serialVersionUID = 6743528196119291326L; |
54 |
|
|
55 |
/** The ID of this attribute. */ |
/** The ID of this attribute. */ |
56 |
protected String attrID; |
protected String attrID; |
57 |
/** True if this attribute's values are ordered. */ |
/** True if this attribute's values are ordered. */ |
164 |
} |
} |
165 |
|
|
166 |
public Object get () |
public Object get () |
167 |
|
throws NamingException |
168 |
{ |
{ |
169 |
if (values.size () == 0) |
if (values.size () == 0) |
170 |
throw new NoSuchElementException ("no values"); |
throw new NoSuchElementException ("no values"); |
172 |
} |
} |
173 |
|
|
174 |
public Object get (int index) |
public Object get (int index) |
175 |
|
throws NamingException |
176 |
{ |
{ |
177 |
return values.get (index); |
return values.get (index); |
178 |
} |
} |
179 |
|
|
180 |
public NamingEnumeration getAll () |
public NamingEnumeration getAll () |
181 |
|
throws NamingException |
182 |
{ |
{ |
183 |
return new BasicAttributeEnumeration (); |
return new BasicAttributeEnumeration (); |
184 |
} |
} |