Class ResolvedPatternElementFactory
Object
com.owenfeehan.pathpatternfinder.patternelements.resolved.ResolvedPatternElementFactory
public class ResolvedPatternElementFactory extends Object
Creation of the different types of resolved elements.
- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description static voidaddConstantAndDirectoryTo(String value, Pattern pattern)LikeaddConstantTo(String,Pattern)but additionally adds a directory separator.static PatternElementaddConstantTo(char value, Pattern pattern)Creates a new constant element from a character, and adds topattern.static PatternElementaddConstantTo(String value, Pattern pattern)Creates a new constant element from a string, and adds topattern.static voidaddDirectorySeperatorTo(Pattern pattern)Creates a new directory-seperator element, and adds topattern.static PatternElementconstant(char value)Creates constant element of a single character.static PatternElementconstant(String value)Creates constant element of a string.static PatternElementdirectorySeperator()Creates an element representing a directory separator.static PatternElementinteger(int... values)Creates a varying integer element of one or more ints.static PatternElementinteger(List<String> values)Creates a varying integer element of one more strings.static PatternElementstring(String... values)Creates a varying string element of one or more strings.static PatternElementstring(List<String> values)Creates a varying string element from a list of strings.
-
Method Details
-
constant
Creates constant element of a single character.- Parameters:
value- the character- Returns:
- a newly created element
-
constant
Creates constant element of a string.- Parameters:
value- the string- Returns:
- a newly created element
-
integer
Creates a varying integer element of one or more ints.- Parameters:
values- the ints that vary- Returns:
- a newly created element
-
integer
Creates a varying integer element of one more strings.- Parameters:
values- the strings that vary- Returns:
- a newly created element
-
string
Creates a varying string element of one or more strings.- Parameters:
values- the strings that vary- Returns:
- a newly created element
-
string
Creates a varying string element from a list of strings.- Parameters:
values- the strings that vary- Returns:
- a newly created element
-
directorySeperator
Creates an element representing a directory separator.e.g. this is a forward-slash on Unix or a backslash on Windows.
- Returns:
- a newly created element
-
addConstantAndDirectoryTo
LikeaddConstantTo(String,Pattern)but additionally adds a directory separator.- Parameters:
value- the value for the constant elementpattern- the pattern to add to
-
addConstantTo
Creates a new constant element from a string, and adds topattern.- Parameters:
value- the value for the constant elementpattern- the pattern to add to- Returns:
- the element that was added
-
addConstantTo
Creates a new constant element from a character, and adds topattern.- Parameters:
value- the value for the constant elementpattern- the pattern to add to- Returns:
- the element that was added
-
addDirectorySeperatorTo
Creates a new directory-seperator element, and adds topattern.- Parameters:
pattern- the pattern to add to
-