public interface IsPath extends CategoryIs, CategoryWithValue, HasDescription
comparator| Modifier and Type | Method and Description |
|---|---|
String |
_value()
Returns the value of an IS category.
|
static de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,org.apache.commons.lang3.text.StrBuilder> |
ADD_ROOT(String separator)
Returns a transformer that adds the separator in front of a path (if path does not start already with separator)
|
static de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,org.apache.commons.lang3.text.StrBuilder> |
CLEAN_PATH(String separator)
Returns a transformer that removes all excessive elements (such as double separators).
|
static IsPath |
create()
Returns a new generic
IsPath object with a default preset path (immutable). |
static IsPath |
create(Object path)
Returns a new generic
IsPath object with defined path and a default description (immutable). |
static IsPath |
create(Object path,
String description)
Returns a new generic
IsPath object with a path (immutable). |
static org.apache.commons.lang3.text.StrBuilder |
forMaxDepth(org.apache.commons.lang3.text.StrBuilder fqpn,
int maxDepth,
String separator)
Checks if the FQPN is less or equal to a maximum depth
|
static Collection<String> |
GET_SUB_PATHS(String separator,
Object fqpn,
Collection<String> coll)
Returns a collection with the names of all children of a given path from a given collection of paths
|
static Predicate<String> |
IS_SUB_PATH_OF(String separator,
Object fqpn)
Returns a predicate that evaluates if a given path is a sub path using a specified path separator.
|
static Predicate<Object> |
IS_VALID_PATH_VALUE(String separator)
Returns a predicate that validates a path value.
|
static <A,B> de.vandermeer.skb.base.Skb_Transformer<org.antlr.v4.runtime.misc.Pair<A,B>,org.apache.commons.lang3.text.StrBuilder> |
JOIN_PATH_ELEMENTS(String separator,
Boolean doClean,
Boolean setRoot)
Returns a transformer that combines a pair of path information into a single path.
|
static de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,List<String>> |
PATH_TO_ARRAY_OF_PATHS(String separator,
Boolean autoRootArray)
Returns a transformer that takes a path (as StrBuilder) and returns a list of all path contained.
|
static de.vandermeer.skb.base.Skb_Transformer<Object,Integer> |
PATH_TO_LEVELS(String separator)
Returns a transformer that calculates the levels in a path.
|
default String |
path()
Returns the path
|
getDescriptionCAT_TO_VALUE, CAT_TO_VALUESTRING, GET_VALUE, GET_VALUESTRING, toLogdefault String path()
String _value()
CategoryWithValue_value in interface CategoryWithValuestatic IsPath create(Object path, String description)
IsPath object with a path (immutable).path - the object's pathdescription - a description for the new pathIsPath object with a set pathstatic IsPath create(Object path)
IsPath object with defined path and a default description (immutable).path - the object's pathIsPath object with a default descriptionstatic IsPath create()
IsPath object with a default preset path (immutable).IsPath object with a default pathstatic Predicate<Object> IS_VALID_PATH_VALUE(String separator)
separator - path separatorstatic Predicate<String> IS_SUB_PATH_OF(String separator, Object fqpn)
separator - path separatorfqpn - original path as FQPNstatic de.vandermeer.skb.base.Skb_Transformer<Object,Integer> PATH_TO_LEVELS(String separator)
separator - path separator to be usedstatic Collection<String> GET_SUB_PATHS(String separator, Object fqpn, Collection<String> coll)
separator - path separator to usefqpn - name of the pathcoll - all paths that are children of the given pathstatic de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,List<String>> PATH_TO_ARRAY_OF_PATHS(String separator, Boolean autoRootArray)
path and name is "/a/b/c/d", then the returned array will be
[a, a/b, a/b/c, a/b/c/d] (assuming that the separator is '/').
The resulting array will have a root node added if autoRoot is activated.separator - path separatorautoRootArray - add root node if true, add nothing if falsestatic de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,org.apache.commons.lang3.text.StrBuilder> CLEAN_PATH(String separator)
separator - path separatorstatic de.vandermeer.skb.base.Skb_Transformer<org.apache.commons.lang3.text.StrBuilder,org.apache.commons.lang3.text.StrBuilder> ADD_ROOT(String separator)
separator - path separatorstatic <A,B> de.vandermeer.skb.base.Skb_Transformer<org.antlr.v4.runtime.misc.Pair<A,B>,org.apache.commons.lang3.text.StrBuilder> JOIN_PATH_ELEMENTS(String separator, Boolean doClean, Boolean setRoot)
A - left type of pairB - right type of pairseparator - path separatordoClean - clean the final path (if true)setRoot - set a root separator on the final path (if true)static org.apache.commons.lang3.text.StrBuilder forMaxDepth(org.apache.commons.lang3.text.StrBuilder fqpn,
int maxDepth,
String separator)
fqpn - FQPN for testingmaxDepth - maximum depth to test for, set to -1 for no testseparator - path separatorCopyright © 2010–2015. All rights reserved.