Class RegularExpression.PartialSubstring
- java.lang.Object
-
- it.unive.lisa.util.datastructures.regex.RegularExpression.PartialSubstring
-
- Enclosing class:
- RegularExpression
public static final class RegularExpression.PartialSubstring extends java.lang.ObjectA class that represents an intermediate result of the computation ofRegularExpression.substring(int, int).
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPartialSubstring(SymbolicString substring, int charsToStart, int missingChars)Builds the partial substring.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RegularExpression.PartialSubstringconcat(RegularExpression.PartialSubstring other)Joins this partial substring with the given one.booleanequals(java.lang.Object obj)protected intgetCharsToStart()Yields the number of characters to skip before starting to collect the substring.protected intgetMissingChars()Yields the number of missing characters to complete the substring.protected SymbolicStringgetSubstring()Yields the current partial substring.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
PartialSubstring
protected PartialSubstring(SymbolicString substring, int charsToStart, int missingChars)
Builds the partial substring.- Parameters:
substring- the current substringmissingChars- the number of missing characters to complete the substringcharsToStart- the number of characters to skip before starting to collect the substring
-
-
Method Detail
-
concat
protected RegularExpression.PartialSubstring concat(RegularExpression.PartialSubstring other)
Joins this partial substring with the given one. This results in concatenating the two partial substrings, while keeping values fromotherforcharsToStartandmissingChars.- Parameters:
other- the other partial substring- Returns:
- the joined partial substring
-
getSubstring
protected SymbolicString getSubstring()
Yields the current partial substring.- Returns:
- the current partial substring
-
getMissingChars
protected int getMissingChars()
Yields the number of missing characters to complete the substring.- Returns:
- the number of missing characters to complete the substring
-
getCharsToStart
protected int getCharsToStart()
Yields the number of characters to skip before starting to collect the substring.- Returns:
- the number of characters to skip before starting to collect the substring
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-