Record Class FindExpr
java.lang.Object
java.lang.Record
ca.phon.app.session.editor.search.FindExpr
- Record Components:
type
- the type of search to performexpr
- the expression to search for, must be valid for the given typecaseSensitive
- whether or not the search should be case sensitive
Find expression used for searching within a transcript.
-
Constructor Summary
ConstructorsConstructorDescriptionFindExpr
(SearchType type, String expr, boolean caseSensitive) Creates an instance of aFindExpr
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of thecaseSensitive
record component.final boolean
Indicates whether some other object is "equal to" this one.expr()
Returns the value of theexpr
record component.Find previous occurrence of the expression in the object.findNextPhonex
(IPATranscript ipa, int charIdx) findNextPlain
(String txt, int charIdx) findNextRegex
(String txt, int charIdx) Find previous occurrence of the expression in the object.findPrevPhonex
(IPATranscript ipa, int charIdx) findPrevPlain
(String txt, int charIdx) findPrevRegex
(String txt, int charIdx) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
FindExpr
Creates an instance of aFindExpr
record class.- Parameters:
type
- the value for thetype
record componentexpr
- the value for theexpr
record componentcaseSensitive
- the value for thecaseSensitive
record component
-
-
Method Details
-
findNext
Find previous occurrence of the expression in the object.- Parameters:
obj
- the object to searchcharIdx
- the character index to start searching from- Returns:
- the range for the next occurrence of the expression in the object, or an empty match if not found
-
findPrev
Find previous occurrence of the expression in the object.- Parameters:
obj
- the object to searchcharIdx
- the character index to start searching from- Returns:
- the range for the previous occurrence of the expression in the object, or null if not found
-
findNextPlain
-
findPrevPlain
-
findNextRegex
-
findPrevRegex
-
findNextPhonex
-
findPrevPhonex
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
type
-
expr
-
caseSensitive
public boolean caseSensitive()Returns the value of thecaseSensitive
record component.- Returns:
- the value of the
caseSensitive
record component
-