Package org.basex.util
Class InterruptibleString
java.lang.Object
org.basex.util.InterruptibleString
- All Implemented Interfaces:
CharSequence
Interruptible string implementation.
Inspired by https://stackoverflow.com/questions/910740/cancelling-a-long-running-regex-match
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen, gojomo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) static voidChecks if search should be interrupted.intlength()subSequence(int start, int end) toString()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
-
InterruptibleString
Constructor.- Parameters:
string- string
-
-
Method Details
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
checkStop
public static void checkStop()Checks if search should be interrupted.
-