Class ResolvedPatternElement
Object
com.owenfeehan.pathpatternfinder.patternelements.PatternElement
com.owenfeehan.pathpatternfinder.patternelements.resolved.ResolvedPatternElement
- Direct Known Subclasses:
VariableElement
public abstract class ResolvedPatternElement extends PatternElement
A
PatternElement
that has been resolved.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ResolvedPatternElement()
-
Method Summary
Modifier and Type Method Description boolean
isResolved()
Can the element no longer be further broken down into smaller units?Optional<Pattern>
resolve()
Converts thisPattern
into smaller units.Methods inherited from class com.owenfeehan.pathpatternfinder.patternelements.PatternElement
describe, equals, extractElementFrom, hasConstantValue, hashCode, reverse, reverseReturn, toString, valueAt
-
Constructor Details
-
ResolvedPatternElement
public ResolvedPatternElement()
-
-
Method Details
-
isResolved
public boolean isResolved()Description copied from class:PatternElement
Can the element no longer be further broken down into smaller units?- Specified by:
isResolved
in classPatternElement
- Returns:
- true iff this element cannot be broken down further into smaller units.
-
resolve
Description copied from class:PatternElement
Converts thisPattern
into smaller units.If isResolved()==true, this method should always return
Optional.empty()
.- Specified by:
resolve
in classPatternElement
- Returns:
- a
Pattern
if successfully broken into smaller units, orOptional.empty()
if this isn't possible
-