public final class SearchResult
extends java.lang.Object
Bestiary
.Constructor and Description |
---|
SearchResult(int value,
java.lang.String label)
Creates a new
SearchResult . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.Optional<java.lang.String> |
getLabel()
Gets an
Optional containing the result's label. |
int |
getValue()
Gets the value of the result.
|
int |
hashCode() |
java.lang.String |
toString() |
public SearchResult(int value, java.lang.String label)
SearchResult
.value
- The value of the result.label
- The label of the result.public int getValue()
public java.util.Optional<java.lang.String> getLabel()
Optional
containing the result's label.Optional
containing the result's label, or Optional.empty()
if no label was found.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object