java.lang.Object
java.lang.Record
io.jenetics.MutatorResult<T>
- Type Parameters:
T
- the mutation result type- Record Components:
result
- the mutation resultmutations
- the number of mutations applied while creating the mutation result
- All Implemented Interfaces:
Serializable
Represents the result pair of one of the four
Mutator.mutate
calls.- Since:
- 4.0
- Version:
- 7.0
- See Also:
-
Constructor Summary
ConstructorDescriptionMutatorResult
(T result, int mutations) Create a new mutation result with the given values. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themutations
record component.result()
Returns the value of theresult
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MutatorResult
Create a new mutation result with the given values.- Parameters:
result
- the mutation resultmutations
- the number of mutations- Throws:
IllegalArgumentException
- if the givenmutations
is negativeNullPointerException
- if the given mutation result isnull
-
-
Method Details
-
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
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-
mutations
Returns the value of themutations
record component.- Returns:
- the value of the
mutations
record component
-