APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming

pack-priv Class NameImpl

Additional top-level class in compilation unit: NameImplEnumerator.

extends Object
Class Inheritance
Imports
java.util.Locale, .Vector, .Enumeration, .Properties, .NoSuchElementException

The implementation class for CompoundName and CompositeName. This class is package private.
Authors
Rosanna Lee, Scott Seligman, Aravindan Ranganathan
Since
1.3

Field Summary

Modifier and TypeField and Description
private Vector<String>
private int
private static final byte
private static final byte
private static final byte
private static final int
private static final int
private static final int
private static final int
private String
private String
private String
private boolean
private byte
private String
private String
private String
private String
private String
private boolean
private String

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(String comp)

public void
add(int posn, String comp)

public boolean
public boolean
addAll(int posn, Enumeration<String> comps)

public int
compareTo(NameImpl obj)

Compares obj to this NameImpl to determine ordering.

public boolean
endsWith(int posn, Enumeration<String> suffix)

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private final int
extractComp(String name, int i, int len, Vector<String> comps)

public String
get(int posn)

public Enumeration<String>
private static boolean
public Enumeration<String>
getPrefix(int posn)

public Enumeration<String>
getSuffix(int posn)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private final boolean
isA(String n, int i, String match)

public boolean
private final boolean
isMeta(String n, int i)

private final boolean
isSeparator(String n, int i)

private final void
public Object
remove(int posn)

public int
size()

private final int
skipSeparator(String name, int i)

public boolean
startsWith(int posn, Enumeration<String> prefix)

private String
private static boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

componentsback to summary
private Vector<String> components
escapingStyleback to summary
private int escapingStyle
FLATback to summary
private static final byte FLAT
LEFT_TO_RIGHTback to summary
private static final byte LEFT_TO_RIGHT
RIGHT_TO_LEFTback to summary
private static final byte RIGHT_TO_LEFT
STYLE_ESCAPEback to summary
private static final int STYLE_ESCAPE
STYLE_NONEback to summary
private static final int STYLE_NONE
STYLE_QUOTE1back to summary
private static final int STYLE_QUOTE1
STYLE_QUOTE2back to summary
private static final int STYLE_QUOTE2
syntaxAvaSeparatorback to summary
private String syntaxAvaSeparator
syntaxBeginQuote1back to summary
private String syntaxBeginQuote1
syntaxBeginQuote2back to summary
private String syntaxBeginQuote2
syntaxCaseInsensitiveback to summary
private boolean syntaxCaseInsensitive
syntaxDirectionback to summary
private byte syntaxDirection
syntaxEndQuote1back to summary
private String syntaxEndQuote1
syntaxEndQuote2back to summary
private String syntaxEndQuote2
syntaxEscapeback to summary
private String syntaxEscape
syntaxSeparatorback to summary
private String syntaxSeparator
syntaxSeparator2back to summary
private String syntaxSeparator2
syntaxTrimBlanksback to summary
private boolean syntaxTrimBlanks
syntaxTypevalSeparatorback to summary
private String syntaxTypevalSeparator

Constructor Detail

NameImplback to summary
pack-priv NameImpl(Properties syntax)
NameImplback to summary
pack-priv NameImpl(Properties syntax, String n) throws InvalidNameException
NameImplback to summary
pack-priv NameImpl(Properties syntax, Enumeration<String> comps)

Method Detail

addback to summary
public void add(String comp) throws InvalidNameException
addback to summary
public void add(int posn, String comp) throws InvalidNameException
addAllback to summary
public boolean addAll(Enumeration<String> comps) throws InvalidNameException
addAllback to summary
public boolean addAll(int posn, Enumeration<String> comps) throws InvalidNameException
compareToback to summary
public int compareTo(NameImpl obj)

Compares obj to this NameImpl to determine ordering. Takes into account syntactic properties such as elimination of blanks, case-ignore, etc, if relevant.

Note

using syntax of this NameImpl and ignoring that of comparison target.

endsWithback to summary
public boolean endsWith(int posn, Enumeration<String> suffix)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

extractCompback to summary
private final int extractComp(String name, int i, int len, Vector<String> comps) throws InvalidNameException
getback to summary
public String get(int posn)
getAllback to summary
public Enumeration<String> getAll()
getBooleanback to summary
private static boolean getBoolean(Properties p, String name)
getPrefixback to summary
public Enumeration<String> getPrefix(int posn)
getSuffixback to summary
public Enumeration<String> getSuffix(int posn)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
isAback to summary
private final boolean isA(String n, int i, String match)
isEmptyback to summary
public boolean isEmpty()
isMetaback to summary
private final boolean isMeta(String n, int i)
isSeparatorback to summary
private final boolean isSeparator(String n, int i)
recordNamingConventionback to summary
private final void recordNamingConvention(Properties p)
removeback to summary
public Object remove(int posn)
sizeback to summary
public int size()
skipSeparatorback to summary
private final int skipSeparator(String name, int i)
startsWithback to summary
public boolean startsWith(int posn, Enumeration<String> prefix)
stringifyCompback to summary
private String stringifyComp(String comp)
toBooleanback to summary
private static boolean toBoolean(String name)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.