Package chemaxon.formats
Record Class Recognizer.RecognizerResult
java.lang.Object
java.lang.Record
chemaxon.formats.Recognizer.RecognizerResult
- Record Components:
acceptedFormats- the accepted formats if recognition was successful or an empty list otherwiserejectedFormats- the surely rejected formats if recognition was unsuccessful. This list can be empty even in the case of unsuccessful recognition, which means that the recognizer could not make a decision about the format based on the given line.
- Enclosing class:
Recognizer
public static record Recognizer.RecognizerResult(List<String> acceptedFormats, List<String> rejectedFormats)
extends Record
Represents the result of a format recognition attempt.
-
Constructor Summary
ConstructorsConstructorDescriptionRecognizerResult(List<String> acceptedFormats, List<String> rejectedFormats) Creates an instance of aRecognizerResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Recognizer.RecognizerResultCreates aRecognizer.RecognizerResultobject accepting the given formats.static Recognizer.RecognizerResultCreates aRecognizer.RecognizerResultobject accepting the given formats.Returns the value of theacceptedFormatsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns true if the recognition was successful and at least one format was accepted, false otherwise.final inthashCode()Returns a hash code value for this object.static Recognizer.RecognizerResultCreates aRecognizer.RecognizerResultobject rejecting the given formats.static Recognizer.RecognizerResultCreates aRecognizer.RecognizerResultobject rejecting the given formats.Returns the value of therejectedFormatsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecognizerResult
Creates an instance of aRecognizerResultrecord class.- Parameters:
acceptedFormats- the value for theacceptedFormatsrecord componentrejectedFormats- the value for therejectedFormatsrecord component
-
-
Method Details
-
accept
Creates aRecognizer.RecognizerResultobject accepting the given formats. -
accept
Creates aRecognizer.RecognizerResultobject accepting the given formats. -
reject
Creates aRecognizer.RecognizerResultobject rejecting the given formats. -
reject
Creates aRecognizer.RecognizerResultobject rejecting the given formats. -
hasAcceptedFormats
public boolean hasAcceptedFormats()Returns true if the recognition was successful and at least one format was accepted, false otherwise. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
acceptedFormats
Returns the value of theacceptedFormatsrecord component.- Returns:
- the value of the
acceptedFormatsrecord component
-
rejectedFormats
Returns the value of therejectedFormatsrecord component.- Returns:
- the value of the
rejectedFormatsrecord component
-