basicattribute.html
来自「API資料大全」· HTML 代码 · 共 949 行 · 第 1/4 页
HTML
949 行
</TABLE><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></B></DD><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>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#clone()">clone</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE><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>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Returns:</B><DD>A non-null copy of the attribute.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Determines whether obj is equal to this attribute. Two attributes are equal if their attribute-ids, syntaxes and values are equal. If the attribute values are unordered, the order that the values were added are irrelevant. If the attribute values are ordered, then the order the values must match. If obj is null or not an Attribute, false is returned.<p> By default <tt>Object.equals()</tt> is used when comparing the attribute id and its values except when a value is an array. For an array, each element of the array is checked using <tt>Object.equals()</tt>. A subclass may override this to make use of schema syntax information and matching rules, which define what it means for two attributes to be equal. How and whether a subclass makes use of the schema information is determined by the subclass. If a subclass overrides <tt>equals()</tt>, it should also override <tt>hashCode()</tt> such that two attributes that are equal have the same hash code.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - The possibly null object to check.<DT><B>Returns:</B><DD>true if obj is equal to this attribute; false otherwise.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/BasicAttribute.html#hashCode()"><CODE>hashCode()</CODE></A>, <A HREF="../../../javax/naming/directory/BasicAttribute.html#contains(java.lang.Object)"><CODE>contains(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Calculates the hash code of this attribute.<p> The hash code is computed by adding the hash code of the attribute's id and that of all of its values except for values that are arrays. For an array, the hash code of each element of the array is summed. If a subclass overrides <tt>hashCode()</tt>, it should override <tt>equals()</tt> as well so that two attributes that are equal have the same hash code.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an int representing the hash code of this attribute.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/BasicAttribute.html#equals(java.lang.Object)"><CODE>equals(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Generates the string representation of this attribute. The string consists of the attribute's id and its values. This string is meant for debuggin and not meant to be interpreted programmatically.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The non-null string representation of this attribute.</DL></DD></DL><HR><A NAME="getAll()"><!-- --></A><H3>getAll</H3><PRE>public <A HREF="../../../javax/naming/NamingEnumeration.html">NamingEnumeration</A> <B>getAll</B>() throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves an enumeration of this attribute's values.<p> By default, the values returned are those passed to the constructor and/or manipulated using the add/replace/remove methods. A subclass may override this to retrieve the values dynamically from the directory.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#getAll()">getAll</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Returns:</B><DD>A non-null enumeration of the attribute's values. Each element of the enumeration is a possibly null Object. The object's class is the class of the attribute value. The element is null if the attribute's value is null. If the attribute has zero values, an empty enumeration is returned.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/naming/NamingException.html">NamingException</A></CODE> - If a naming exception was encountered while retrieving the values.<DT><B>See Also: </B><DD><A HREF="../../../javax/naming/directory/Attribute.html#isOrdered()"><CODE>Attribute.isOrdered()</CODE></A></DL></DD></DL><HR><A NAME="get()"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>get</B>() throws <A HREF="../../../javax/naming/NamingException.html">NamingException</A></PRE><DL><DD>Retrieves one of this attribute's values.<p> By default, the value returned is one of those passed to the constructor and/or manipulated using the add/replace/remove methods. A subclass may override this to retrieve the value dynamically from the directory.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#get()">get</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Returns:</B><DD>A possibly null object representing one of the attribute's value. It is null if the attribute's 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/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - If this attribute has no values.</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></B></DD><DD>Retrieves the number of values in this attribute.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#size()">size</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Returns:</B><DD>The nonnegative number of values in this attribute.</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getID</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></B></DD><DD>Retrieves the id of this attribute.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#getID()">getID</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Returns:</B><DD>The id of this attribute. It cannot be null.</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/lang/Object.html">Object</A> attrVal)</PRE><DL><DD>Determines whether a value is in this attribute.<p> By default, <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt> with this attribute's values except when <tt>attrVal</tt> is an array. For an array, each element of the array is checked using <tt>Object.equals()</tt>. A subclass may use schema information to determine equality.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attrVal</CODE> - The possibly null value to check. If null, check whether the attribute has an attribute value whose value is null.<DT><B>Returns:</B><DD>true if attrVal is one of this attribute's values; false otherwise.<DT><B>See Also: </B><DD><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A>, <A HREF="../../../javax/naming/directory/BasicAttribute.html#equals(java.lang.Object)"><CODE>equals(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="../../../java/lang/Object.html">Object</A> attrVal)</PRE><DL><DD>Adds a new value to this attribute. <p> By default, <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt> with this attribute's values except when <tt>attrVal</tt> is an array. For an array, each element of the array is checked using <tt>Object.equals()</tt>. A subclass may use schema information to determine equality.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attrVal</CODE> - The new possibly null value to add. If null, null is added as an attribute value.<DT><B>Returns:</B><DD>true if a value was added; false otherwise.</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public boolean <B>remove</B>(<A HREF="../../../java/lang/Object.html">Object</A> attrval)</PRE><DL><DD>Removes a specified value from this attribute.<p> By default, <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt> with this attribute's values except when <tt>attrVal</tt> is an array. For an array, each element of the array is checked using <tt>Object.equals()</tt>. A subclass may use schema information to determine equality.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/naming/directory/Attribute.html#remove(java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../../../javax/naming/directory/Attribute.html">Attribute</A></CODE></DL></DD><DD>Following copied from interface: <CODE>javax.naming.directory.Attribute</CODE></DD><DD><DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?