|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImmutableName
This interface is responsible for managing the names for all the database objects. Examples of real name are "http://accbee.com", "c:\program files\access road", "net/users/john". The separator character depends on the ACS. All the real names are converted in Access Road names implemented by this class. The single separator in all the Access Road names is ':: '. Every ImmutableName instance must be a Name instance. The name is an list of components in a java.util.ArrayList. Each component is a string that may be null. Case must be respected. component(int) and lastComponent() return only copies of the component, as the others methods which return new objects, no linked to the current name. compareTo() allows an immutable name to be a key in a sorted map.
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
|
java.lang.String |
component(int _i)
No exception thrown. |
java.util.List<java.lang.String> |
components()
|
boolean |
contains(ImmutableName _name)
|
Name |
context()
Get a copy of the current name less the last component. |
Name |
context(int _end)
Get a copy of the current name less some last components. |
boolean |
equals(java.lang.Object _obj)
|
long |
getSerialVersionUID()
|
int |
hashCode()
|
java.util.List |
immutableComponents()
|
boolean |
isEmpty()
|
java.lang.String |
lastComponent()
|
int |
noOfComponents()
|
Name |
subname(int _start,
int _end)
|
Method Detail |
---|
boolean isEmpty()
Name context()
Name context(int _end)
_end
- is the _inclusive_ index of the last component to be returned
Name subname(int _start, int _end)
_start
- inclusive fromIndex_end
- exclusive toIndex
java.util.List<java.lang.String> components()
java.util.List immutableComponents()
int noOfComponents()
java.lang.String component(int _i)
_i
- index of the component. No limit on the value.
java.lang.String lastComponent()
boolean contains(ImmutableName _name)
_name
- Never null.
java.lang.Object clone()
boolean equals(java.lang.Object _obj)
equals
in class java.lang.Object
_obj
- the object to compare
int hashCode()
hashCode
in class java.lang.Object
int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- Object to compare must be an ImmutableName (true for Name)
java.lang.ClassCastException
- - if the specified object's type
prevents it from being compared to this current Objectlong getSerialVersionUID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |