jjdh API

jjdh.java.resource
Class ResourceReference

java.lang.Object
  extended by jjdh.java.resource.ResourceReference
All Implemented Interfaces:
Comparable<ResourceReference>

public class ResourceReference
extends Object
implements Comparable<ResourceReference>


Field Summary
protected  Set<ResourceReference> childs
           
protected  String fullName
           
protected  boolean isDirectory
           
protected  String name
           
protected  ResourceReference parent
           
static String SEPARATOR
           
 
Constructor Summary
  ResourceReference()
          This creates a new root directory.
protected ResourceReference(ResourceReference parent, String name, boolean isDirectory)
           
 
Method Summary
 ResourceReference add(String regex)
           
protected  ResourceReference addChild(String name, boolean isDirectory)
           
 int compareTo(ResourceReference o)
           
 boolean contains(String regex)
           
protected  boolean contains(String[] name, boolean isDir)
           
 boolean equals(Object o)
           
 ResourceReference get(String regex)
           
protected  ResourceReference get(String[] name, boolean isDir)
           
 Set<ResourceReference> getChilds()
           
 Set<ResourceReference> getChildsRecursive()
           
 Set<ResourceReference> getChildsRecursive(String ending)
           
 String getName()
           
 ResourceReference getParent()
           
protected  ResourceReference getRoot()
           
 boolean isDirectory()
           
protected static boolean isDirectory(String regex)
           
 boolean isRoot()
           
protected static String[] split(String regex)
           
protected  void supplementChildsRecursive(TreeSet<ResourceReference> result)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

public static final String SEPARATOR
See Also:
Constant Field Values

parent

protected final ResourceReference parent

childs

protected Set<ResourceReference> childs

name

protected final String name

fullName

protected final String fullName

isDirectory

protected final boolean isDirectory
Constructor Detail

ResourceReference

public ResourceReference()
This creates a new root directory.


ResourceReference

protected ResourceReference(ResourceReference parent,
                            String name,
                            boolean isDirectory)
Method Detail

addChild

protected ResourceReference addChild(String name,
                                     boolean isDirectory)

get

public ResourceReference get(String regex)

get

protected ResourceReference get(String[] name,
                                boolean isDir)

contains

public boolean contains(String regex)

contains

protected boolean contains(String[] name,
                           boolean isDir)

add

public ResourceReference add(String regex)

split

protected static String[] split(String regex)

isDirectory

protected static boolean isDirectory(String regex)

getChilds

public Set<ResourceReference> getChilds()

getChildsRecursive

public Set<ResourceReference> getChildsRecursive(String ending)

getChildsRecursive

public Set<ResourceReference> getChildsRecursive()

supplementChildsRecursive

protected void supplementChildsRecursive(TreeSet<ResourceReference> result)

getRoot

protected ResourceReference getRoot()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(ResourceReference o)
Specified by:
compareTo in interface Comparable<ResourceReference>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

isDirectory

public boolean isDirectory()

getName

public String getName()

getParent

public ResourceReference getParent()

isRoot

public boolean isRoot()

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.