📄 attribute.html
字号:
or "Telephone Number". Or a value might be a byte array, and its directory syntax is "JPEG" or "Certificate". For example, if this attribute's syntax is "JPEG", this method would return the syntax definition for "JPEG". <p> The information that you can retrieve from a syntax definition is directory-dependent.<p> If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The attribute's syntax definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/OperationNotSupportedException.html">OperationNotSupportedException</A></CODE> - If getting the schema is not supported.<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception occurs while getting the schema.</DL></DD></DL><HR><A NAME="getAttributeDefinition()"><!-- --></A><H3>getAttributeDefinition</H3><PRE>public <A HREF="../../../javax/naming/directory/DirContext.html">DirContext</A> <B>getAttributeDefinition</B>() throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves the attribute's schema definition. An attribute's schema definition contains information such as whether the attribute is multivalued or single-valued, the matching rules to use when comparing the attribiute's values. The information that you can retrieve from an attribute definition is directory-dependent.<p> If an implementation does not support schemas, it should throw OperationNotSupportedException. If an implementation does support schemas, it should define this method to return the appropriate information.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>This attribute's schema definition. Null if the implementation supports schemas but this particular attribute does not have any schema information.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/OperationNotSupportedException.html">OperationNotSupportedException</A></CODE> - If getting the schema is not supported.<DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception occurs while getting the schema.</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD>Makes a copy of the attribute. The copy contains the same attribute values as the original attribute: the attribute values are not themselves cloned. Changes to the copy will not affect the original and vice versa.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A non-null copy of the attribute.</DL></DD></DL><HR><A NAME="isOrdered()"><!-- --></A><H3>isOrdered</H3><PRE>public boolean <B>isOrdered</B>()</PRE><DL><DD>Determines whether this attribute's values are ordered. If an attribute's values are ordered, duplicate values are allowed. If an attribute's values are unordered, they are presented in any order and there are no duplicate values.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if this attribute's values are ordered; false otherwise.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/Attribute.html#get(int)"><CODE>get(int)</CODE></A>, <A HREF="../../../javax/naming/directory/Attribute.html#remove(int)"><CODE>remove(int)</CODE></A>, <A HREF="../../../javax/naming/directory/Attribute.html#add(int, java.lang.Object)"><CODE>add(int, java.lang.Object)</CODE></A>, <A HREF="../../../javax/naming/directory/Attribute.html#set(int, java.lang.Object)"><CODE>set(int, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>get</B>(int ix) throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the <tt>ix</tt> index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ix</CODE> - The index of the value in the ordered list of attribute values. 0 <= <tt>ix</tt> < <tt>size()</tt>.<DT><B>Returns:</B><DD>The possibly null attribute value at index <tt>ix</tt>; null if the attribute value is null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception was encountered while retrieving the value.<DD><CODE><A HREF="../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - If <tt>ix</tt> is outside the specified range.</DL></DD></DL><HR><A NAME="remove(int)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>remove</B>(int ix)</PRE><DL><DD>Removes an attribute value from the ordered list of attribute values. This method removes the value at the <tt>ix</tt> index of the list of attribute values. If the attribute values are unordered, this method removes the value that happens to be at that index. Values located at indices greater than <tt>ix</tt> are shifted up towards the front of the list (and their indices decremented by one).<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ix</CODE> - The index of the value to remove. 0 <= <tt>ix</tt> < <tt>size()</tt>.<DT><B>Returns:</B><DD>The possibly null attribute value at index <tt>ix</tt> that was removed; null if the attribute value is null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - If <tt>ix</tt> is outside the specified range.</DL></DD></DL><HR><A NAME="add(int, java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public void <B>add</B>(int ix, <A HREF="../../../java/lang/Object.html">Object</A> attrVal)</PRE><DL><DD>Adds an attribute value to the ordered list of attribute values. This method adds <tt>attrVal</tt> to the list of attribute values at index <tt>ix</tt>. Values located at indices at or greater than <tt>ix</tt> are shifted down towards the end of the list (and their indices incremented by one). If the attribute values are unordered and already have <tt>attrVal</tt>, <tt>IllegalStateException</tt> is thrown.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ix</CODE> - The index in the ordered list of attribute values to add the new value. 0 <= <tt>ix</tt> <= <tt>size()</tt>.<DD><CODE>attrVal</CODE> - The possibly null attribute value to add; if null, null is the value added.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - If <tt>ix</tt> is outside the specified range.<DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - If the attribute values are unordered and <tt>attrVal</tt> is one of those values.</DL></DD></DL><HR><A NAME="set(int, java.lang.Object)"><!-- --></A><H3>set</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>set</B>(int ix, <A HREF="../../../java/lang/Object.html">Object</A> attrVal)</PRE><DL><DD>Sets an attribute value in the ordered list of attribute values. This method sets the value at the <tt>ix</tt> index of the list of attribute values to be <tt>attrVal</tt>. The old value is removed. If the attribute values are unordered, this method sets the value that happens to be at that index to <tt>attrVal</tt>, unless <tt>attrVal</tt> is already one of the values. In that case, <tt>IllegalStateException</tt> is thrown.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ix</CODE> - The index of the value in the ordered list of attribute values. 0 <= <tt>ix</tt> < <tt>size()</tt>.<DD><CODE>attrVal</CODE> - The possibly null attribute value to use. If null, 'null' replaces the old value.<DT><B>Returns:</B><DD>The possibly null attribute value at index ix that was replaced. Null if the attribute value was null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - If <tt>ix</tt> is outside the specified range.<DD><CODE><A HREF="../../../java/lang/IllegalStateException.html">IllegalStateException</A></CODE> - If <tt>attrVal</tt> already exists and the attribute values are unordered.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Attribute.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../javax/naming/directory/Attributes.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Attribute.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -