diff options
Diffstat (limited to 'libjava/classpath/javax/naming/Name.java')
-rw-r--r-- | libjava/classpath/javax/naming/Name.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libjava/classpath/javax/naming/Name.java b/libjava/classpath/javax/naming/Name.java index f0475766a97..687ebd6fbde 100644 --- a/libjava/classpath/javax/naming/Name.java +++ b/libjava/classpath/javax/naming/Name.java @@ -60,8 +60,10 @@ import java.util.Enumeration; * @author Anthony Green (green@redhat.com) * @author Mark Wielaard (mark@klomp.org) */ -public interface Name extends Cloneable, Serializable, Comparable +public interface Name extends Cloneable, Serializable, Comparable<Object> { + // This class is implemented as gnu.javax.naming.ictxImpl.trans.GnuName + long serialVersionUID = -3617482732056931635L; /** @@ -80,7 +82,7 @@ public interface Name extends Cloneable, Serializable, Comparable * Returns a non-null (but possibly empty) <code>Enumeration</code> of the * components of the <code>Name</code> as <code>String</code>s. */ - Enumeration getAll(); + Enumeration<String> getAll(); /** * Gets the component at the given index. @@ -94,22 +96,27 @@ public interface Name extends Cloneable, Serializable, Comparable * Returns the components till the given index as a <code>Name</code>. * The returned <code>Name</code> can be modified without changing the * original. + * + * @param posn the ending position, exclusive * * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to <code>size()</code>. */ - Name getPrefix(int i); + Name getPrefix(int posn); /** * Returns the components from the given index till the end as a * <code>Name</code>. * The returned <code>Name</code> can be modified without changing the * original. + * + * @param posn the starting position, inclusive. If it is equal to the size + * of the name, the empty name is returned. * * @exception ArrayIndexOutOfBoundsException if the given index is smaller * then zero or greater then or equal to <code>size()</code>. */ - Name getSuffix(int i); + Name getSuffix(int posn); /** * Adds the given <code>String</code> component to the end of this @@ -145,7 +152,8 @@ public interface Name extends Cloneable, Serializable, Comparable /** * Inserts all the components of the given <code>Name</code> to this - * <code>Name</code> at the given index. The method modifies the current + * <code>Name</code> at the given index. Components after this index + * (if any) are shifted up. The method modifies the current * <code>Name</code> and then returns it. * * @exception ArrayIndexOutOfBoundsException if the given index is smaller |