Java Doc for Name.java in  » Apache-Harmony-Java-SE » javax-package » javax » naming » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » javax package » javax.naming 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.naming.Name

All known Subclasses:   javax.naming.CompoundName,  javax.naming.CompositeName,  javax.naming.ldap.LdapName,
Name
public interface Name extends Cloneable,Serializable,Comparable<Object>(Code)
A Name interface represents a name in a naming service.

A name which implements this interface has a sequence of zero or more elements delimited by separators. Each element can be accessed using its position. The first element is at position 0.

This interface is implemented by 2 classes - CompoundName and CompositeName.

Examples of names are:

 File system name - for example /home/jenningm/.profile
 DNS hostname     - for example www.apache.org
 Internet URL     - for example http://www.eclipse.org/org/index.html
 


See Also:   CompositeName
See Also:   CompoundName


Field Summary
final public static  longserialVersionUID
    


Method Summary
public  Nameadd(String s)
     Append an element to this Name.
public  Nameadd(int i, String s)
     Insert an element within this Name at the specified position.
public  NameaddAll(Name name)
     Append a name to this Name.
public  NameaddAll(int i, Name name)
     Insert a name within this Name at the specified position. The name itself may have a number of elements.
Parameters:
  i - the index of the element where to start inserting the name -must be greater than or equal to 0 and less than or equal tosize.
Parameters:
  name - the name to insert into this Name.
public  Objectclone()
     Create a copy of this Name.
public  intcompareTo(Object o)
     Compare this Name with the one supplied as a parameter. Each class which implements this interface will have a specification of how to do the comparison.
Parameters:
  o - the object to compare - cannot be null.
public  booleanendsWith(Name name)
     Check if this Name ends with the elements in the supplied name.
public  Stringget(int i)
     Get an element of this Name.
Parameters:
  i - the index of the required element - must be greater than orequal to 0 and less than size().
public  Enumeration<String>getAll()
     Get all the elements of this Name.
public  NamegetPrefix(int i)
     Create a new Name which comprises the first several elements of this Name.
Parameters:
  i - the index of the first element not to be included - must begreater than or equal to 0 and less than or equal to size.
public  NamegetSuffix(int i)
     Create a new Name which comprises the last (size() - i) elements of this Name.
Parameters:
  i - the index of the first element to be included - must begreater than or equal to 0 and less than size.
public  booleanisEmpty()
     Check if this Name is empty.
public  Objectremove(int i)
     Delete an element from this Name.
Parameters:
  i - the index of the element to delete - must be greater than orequal to 0 and less than size.
public  intsize()
     Get the size of this Name.
public  booleanstartsWith(Name name)
     Check if this Name starts with the elements in the supplied name.

Field Detail
serialVersionUID
final public static long serialVersionUID(Code)





Method Detail
add
public Name add(String s) throws InvalidNameException(Code)
Append an element to this Name.
Parameters:
  s - the string to append this Name
throws:
  InvalidNameException - if the addition of the element results in thisName becoming invalid.



add
public Name add(int i, String s) throws InvalidNameException(Code)
Insert an element within this Name at the specified position.
Parameters:
  i - the index of the element where to insert the element - must begreater than or equal to 0 and less than or equal to size.
Parameters:
  s - the String to insert this Name.
throws:
  InvalidNameException - if the insertion of the element results in this Name becominginvalid.



addAll
public Name addAll(Name name) throws InvalidNameException(Code)
Append a name to this Name. The name itself may have a number of elements.
Parameters:
  name - the name to append onto this Name. this Name
throws:
  InvalidNameException - if name is invalid or the addition of the name results inthis Name becoming invalid.



addAll
public Name addAll(int i, Name name) throws InvalidNameException(Code)
Insert a name within this Name at the specified position. The name itself may have a number of elements.
Parameters:
  i - the index of the element where to start inserting the name -must be greater than or equal to 0 and less than or equal tosize.
Parameters:
  name - the name to insert into this Name. this Name
throws:
  InvalidNameException - if name is invalid or the addition of the name results inthis Name becoming invalid.



clone
public Object clone()(Code)
Create a copy of this Name. a complete (deep) copy of the object.



compareTo
public int compareTo(Object o)(Code)
Compare this Name with the one supplied as a parameter. Each class which implements this interface will have a specification of how to do the comparison.
Parameters:
  o - the object to compare - cannot be null. a negative number means this is less than the supplied object. apositive number means this is greater than the supplied object.Zero means the two objects are equal.



endsWith
public boolean endsWith(Name name)(Code)
Check if this Name ends with the elements in the supplied name. The supplied name itself may have a number of elements.
Parameters:
  name - the name to check against this name. true when the supplied name matches else returns false.



get
public String get(int i)(Code)
Get an element of this Name.
Parameters:
  i - the index of the required element - must be greater than orequal to 0 and less than size(). the element at the specified position
throws:
  ArrayIndexOutOfBoundsException - when the position is invalid. If the Name isempty this always returnsArrayIndexOutOfBoundsException



getAll
public Enumeration<String> getAll()(Code)
Get all the elements of this Name. If the Name is empty then return an empty Enumeration. an enumeration of Name elements - cannot be null



getPrefix
public Name getPrefix(int i)(Code)
Create a new Name which comprises the first several elements of this Name.
Parameters:
  i - the index of the first element not to be included - must begreater than or equal to 0 and less than or equal to size. If0 then an empty name is returned. a new Name which comprises the first severalelements of this Name
throws:
  ArrayIndexOutOfBoundsException - when the position is invalid.



getSuffix
public Name getSuffix(int i)(Code)
Create a new Name which comprises the last (size() - i) elements of this Name.
Parameters:
  i - the index of the first element to be included - must begreater than or equal to 0 and less than size. a new Name which comprises the last (size() - i)elements of this Name
throws:
  ArrayIndexOutOfBoundsException - when the position is invalid.



isEmpty
public boolean isEmpty()(Code)
Check if this Name is empty. A Name is empty when it has no elements. true if empty, else returns false



remove
public Object remove(int i) throws InvalidNameException(Code)
Delete an element from this Name.
Parameters:
  i - the index of the element to delete - must be greater than orequal to 0 and less than size. the deleted element
throws:
  InvalidNameException - if the deletion of the element results in thisName becoming invalid.



size
public int size()(Code)
Get the size of this Name. The size of a Name is its number of elements. the size of this name - cannot be null - can be zero



startsWith
public boolean startsWith(Name name)(Code)
Check if this Name starts with the elements in the supplied name. The supplied name itself may have a number of elements.
Parameters:
  name - the name to check against this name true when the supplied name matches else returns false



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.