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.Object
A class that represents an intermediate result of the computation ofRegularExpression.substring(int, int)
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PartialSubstring(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.PartialSubstring
concat(RegularExpression.PartialSubstring other)
Joins this partial substring with the given one.boolean
equals(java.lang.Object obj)
protected int
getCharsToStart()
Yields the number of characters to skip before starting to collect the substring.protected int
getMissingChars()
Yields the number of missing characters to complete the substring.protected SymbolicString
getSubstring()
Yields the current partial substring.int
hashCode()
java.lang.String
toString()
-
-
-
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 fromother
forcharsToStart
andmissingChars
.- 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-