FileDocCategorySizeDatePackage
Path.javaAPI DocExample1829Thu Nov 08 00:22:50 GMT 2001com.ora.rmibook.chapter15

Path

public class Path extends SerializableList

Fields Summary
Constructors Summary
private Path()

/* here so we can deserialize */
    
public Path(List components)

        super (components);
    
Methods Summary
public static com.ora.rmibook.chapter15.PathbuildPath(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 intcompareObjects(java.lang.Object firstObject, java.lang.Object secondObject)

        String firstString = (String) firstObject;
        String secondString = (String) secondObject;

        return firstString.compareTo(secondString);
    
protected booleancontainerIsOfSameType(java.lang.Object object)

        return (object instanceof Path);
    
protected booleanequalObjects(java.lang.Object firstObject, java.lang.Object secondObject)

        String firstString = (String) firstObject;
        String secondString = (String) secondObject;

        return firstString.equals(secondString);
    
public synchronized java.lang.StringgetFirstComponent()

        if (_containedObjects.size() == 0) {
            return null;
        }
        return (String) _containedObjects.get(0);
    
public synchronized com.ora.rmibook.chapter15.PathgetSubPath()

        if (_containedObjects.size() == 0) {
            return null;
        }
        ArrayList subPathComponents = new ArrayList(_containedObjects);

        subPathComponents.remove(0);
        return new Path(subPathComponents);
    
public synchronized booleanisEmpty()

        return (0 == getSize());