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 aFindExprrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecaseSensitiverecord component.final booleanIndicates whether some other object is "equal to" this one.expr()Returns the value of theexprrecord 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 inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FindExpr
Creates an instance of aFindExprrecord class.- Parameters:
type- the value for thetyperecord componentexpr- the value for theexprrecord componentcaseSensitive- the value for thecaseSensitiverecord 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 thecomparemethod from their corresponding wrapper classes. -
type
-
expr
-
caseSensitive
public boolean caseSensitive()Returns the value of thecaseSensitiverecord component.- Returns:
- the value of the
caseSensitiverecord component
-