org.icepdf.core.pobjects
Class Name

java.lang.Object
  extended by org.icepdf.core.pobjects.Name

public class Name
extends java.lang.Object

A name class is an atomic symbol uniquely defined by a sequence of characters. Uniquely defined means that any two name objects made up of the same sequence of characters are identical. Atomic means that a name has no internal structure, although it is defined by a sequence of characters, those characters are not "elements" of the name.

A slash character (/) introduces a name. The slash is not part of the name itself, but a prefix indicating that the following sequence of characters constitutes a name. There can be no white-space characters between the slash and the first character in the name. The name may include any regular characters, but no delimiter or white-space characters. Uppercase and lowercase letters are considered distinct forexample, /A and /a are different names.

Names are similar to References in that objects in a PDF document can be accessed by their use. The Library class can result in any Name object and return the corresponding PDF object.

Since:
1.1

Constructor Summary
Name(java.lang.String name)
          Create a new instance of a Name object.
Name(java.lang.StringBuilder name)
          Create a new instance of a Name object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other Name object is "equal to" this one
 java.lang.String getName()
          Gets the name of the Name object.
 int hashCode()
          Returns a hash code value for the Name object.
 java.lang.String toString()
          Gets the string value of the Name object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Name

public Name(java.lang.String name)
Create a new instance of a Name object.

Parameters:
name - the name value of the Name object

Name

public Name(java.lang.StringBuilder name)
Create a new instance of a Name object.

Parameters:
name - the name value of the Name object
Method Detail

getName

public java.lang.String getName()
Gets the name of the Name object.

Returns:
name of the object

toString

public java.lang.String toString()
Gets the string value of the Name object. This is the same as getName()

Overrides:
toString in class java.lang.Object
Returns:
string representation of the name.
See Also:
getName()

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other Name object is "equal to" this one

Overrides:
equals in class java.lang.Object
Parameters:
obj - name object that this Name object is compared against
Returns:
true, if this object is the same as the obj argument; false, otherwise.

hashCode

public int hashCode()
Returns a hash code value for the Name object. This hash is based on the String representation of name of the Name object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.