org.squashtest.csp.tm.domain.library.structures
Class StringPathMap<T>

java.lang.Object
  extended by org.squashtest.csp.tm.domain.library.structures.StringPathMap<T>

public class StringPathMap<T>
extends Object


Constructor Summary
StringPathMap()
           
 
Method Summary
 List<String> getKnownChildrenPath(String path)
          given a path, will return paths corresponding to children present in the map.
 T getMappedElement(String path)
           
 String getPath(T needle)
           
 void put(String path, T ref)
           
static List<String> tokenizePath(String path)
          Given a path begining with a '/', will return all the names composing the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringPathMap

public StringPathMap()
Method Detail

put

public void put(String path,
                T ref)

getMappedElement

public T getMappedElement(String path)

getPath

public String getPath(T needle)

getKnownChildrenPath

public List<String> getKnownChildrenPath(String path)
given a path, will return paths corresponding to children present in the map.

Parameters:
path -
Returns:

tokenizePath

public static List<String> tokenizePath(String path)
Given a path begining with a '/', will return all the names composing the path. The first returned elements will always be "/", which means the root of course.



Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.