Record Class StatusReporter
java.lang.Object
java.lang.Record
uk.ac.gda.services.common.device.api.StatusReporter
- All Implemented Interfaces:
StatusBoolean.Reporter
public record StatusReporter(String reportWhenTrue, String reportWhenFalse, String reportOnError)
extends Record
implements StatusBoolean.Reporter
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStatusReporter(String reportWhenTrue, String reportWhenFalse, String reportOnError) Creates an instance of aStatusReporterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static StatusReporter.Builderfinal inthashCode()Returns a hash code value for this object.Returns the value of thereportOnErrorrecord component.Returns the value of thereportWhenFalserecord component.Returns the value of thereportWhenTruerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.gda.services.common.device.api.StatusBoolean.Reporter
reportOn
-
Constructor Details
-
StatusReporter
Creates an instance of aStatusReporterrecord class.- Parameters:
reportWhenTrue- the value for thereportWhenTruerecord componentreportWhenFalse- the value for thereportWhenFalserecord componentreportOnError- the value for thereportOnErrorrecord component
-
-
Method Details
-
getBuilder
-
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). -
reportWhenTrue
Returns the value of thereportWhenTruerecord component.- Specified by:
reportWhenTruein interfaceStatusBoolean.Reporter- Returns:
- the value of the
reportWhenTruerecord component
-
reportWhenFalse
Returns the value of thereportWhenFalserecord component.- Specified by:
reportWhenFalsein interfaceStatusBoolean.Reporter- Returns:
- the value of the
reportWhenFalserecord component
-
reportOnError
Returns the value of thereportOnErrorrecord component.- Specified by:
reportOnErrorin interfaceStatusBoolean.Reporter- Returns:
- the value of the
reportOnErrorrecord component
-