Class TimeoutRegexCharSequence
java.lang.Object
org.qubership.atp.common.utils.regex.TimeoutRegexCharSequence
- All Implemented Interfaces:
CharSequence
-
Constructor Summary
ConstructorsConstructorDescriptionTimeoutRegexCharSequence(CharSequence inner, int timeout) Constructor for TimeoutRegexCharSequence. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) Method for regexp processing to char with timeout check.intlength()Get Length of inner CharSequence.subSequence(int start, int end) Get SubSequence of inner CharSequence.toString()Make String representation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
TimeoutRegexCharSequence
Constructor for TimeoutRegexCharSequence.- Parameters:
inner- regexp patterntimeout- timeout (seconds) for regexp processing.
-
-
Method Details
-
charAt
public char charAt(int index) Method for regexp processing to char with timeout check.- Specified by:
charAtin interfaceCharSequence- Parameters:
index- of char- Returns:
- char at specified index; but if timeoutTime is over, TimeoutRegexException is thrown instead.
-
length
public int length()Get Length of inner CharSequence.- Specified by:
lengthin interfaceCharSequence- Returns:
- int length of inner CharSequence.
-
subSequence
Get SubSequence of inner CharSequence.- Specified by:
subSequencein interfaceCharSequence- Parameters:
start- the start index, inclusiveend- the end index, exclusive- Returns:
- new TimeoutRegexCharSequence for inner.subSequence(start, end) and timeoutMillis.
-
toString
Make String representation.- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject- Returns:
- String representation of the object; inner.toString() currently.
-