Methods Summary |
---|
public static com.ora.rmibook.chapter15.Path | buildPath(java.lang.String[] components)
ArrayList arrayList = new ArrayList(components.length);
for (int i = 0; i < components.length; i++) {
if ((null != components[i]) && (0 != components[i].length())) {
arrayList.add(components[i]);
}
}
return new Path(arrayList);
|
protected int | compareObjects(java.lang.Object firstObject, java.lang.Object secondObject)
String firstString = (String) firstObject;
String secondString = (String) secondObject;
return firstString.compareTo(secondString);
|
protected boolean | containerIsOfSameType(java.lang.Object object)
return (object instanceof Path);
|
protected boolean | equalObjects(java.lang.Object firstObject, java.lang.Object secondObject)
String firstString = (String) firstObject;
String secondString = (String) secondObject;
return firstString.equals(secondString);
|
public synchronized java.lang.String | getFirstComponent()
if (_containedObjects.size() == 0) {
return null;
}
return (String) _containedObjects.get(0);
|
public synchronized com.ora.rmibook.chapter15.Path | getSubPath()
if (_containedObjects.size() == 0) {
return null;
}
ArrayList subPathComponents = new ArrayList(_containedObjects);
subPathComponents.remove(0);
return new Path(subPathComponents);
|
public synchronized boolean | isEmpty()
return (0 == getSize());
|