< prev index next >
src/java.desktop/share/classes/javax/swing/tree/TreePath.java
Print this page
*** 73,83 ****
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
* @author Scott Violet
* @author Philip Milne
*/
--- 73,83 ----
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @author Scott Violet
* @author Philip Milne
*/
*** 277,303 ****
public int hashCode() {
return getLastPathComponent().hashCode();
}
/**
! * Returns true if <code>aTreePath</code> is a
* descendant of this
! * {@code TreePath}. A {@code TreePath} {@code P1} is a descendant of a
! * {@code TreePath} {@code P2}
* if {@code P1} contains all of the elements that make up
* {@code P2's} path.
* For example, if this object has the path {@code [a, b]},
! * and <code>aTreePath</code> has the path {@code [a, b, c]},
! * then <code>aTreePath</code> is a descendant of this object.
! * However, if <code>aTreePath</code> has the path {@code [a]},
* then it is not a descendant of this object. By this definition
* a {@code TreePath} is always considered a descendant of itself.
! * That is, <code>aTreePath.isDescendant(aTreePath)</code> returns
* {@code true}.
*
* @param aTreePath the {@code TreePath} to check
! * @return true if <code>aTreePath</code> is a descendant of this path
*/
public boolean isDescendant(TreePath aTreePath) {
if(aTreePath == this)
return true;
--- 277,303 ----
public int hashCode() {
return getLastPathComponent().hashCode();
}
/**
! * Returns true if {@code aTreePath} is a
* descendant of this
! * {@code TreePath}. A {@code TreePath P1} is a descendant of a
! * {@code TreePath P2}
* if {@code P1} contains all of the elements that make up
* {@code P2's} path.
* For example, if this object has the path {@code [a, b]},
! * and {@code aTreePath} has the path {@code [a, b, c]},
! * then {@code aTreePath} is a descendant of this object.
! * However, if {@code aTreePath} has the path {@code [a]},
* then it is not a descendant of this object. By this definition
* a {@code TreePath} is always considered a descendant of itself.
! * That is, {@code aTreePath.isDescendant(aTreePath)} returns
* {@code true}.
*
* @param aTreePath the {@code TreePath} to check
! * @return true if {@code aTreePath} is a descendant of this path
*/
public boolean isDescendant(TreePath aTreePath) {
if(aTreePath == this)
return true;
*** 315,325 ****
return false;
}
/**
* Returns a new path containing all the elements of this path
! * plus <code>child</code>. <code>child</code> is the last element
* of the newly created {@code TreePath}.
*
* @param child the path element to add
* @throws NullPointerException if {@code child} is {@code null}
* @return a new path containing all the elements of this path
--- 315,325 ----
return false;
}
/**
* Returns a new path containing all the elements of this path
! * plus {@code child}. {@code child} is the last element
* of the newly created {@code TreePath}.
*
* @param child the path element to add
* @throws NullPointerException if {@code child} is {@code null}
* @return a new path containing all the elements of this path
< prev index next >