Record Class TextDetailPopup.ValidationResult<T>
java.lang.Object
java.lang.Record
johnsmith.configoverhauled.impl.client.gui.popup.TextDetailPopup.ValidationResult<T>
- Enclosing class:
TextDetailPopup<T>
-
Constructor Summary
ConstructorsConstructorDescriptionValidationResult(boolean valid, T value, @Nullable net.minecraft.network.chat.Component error) Creates an instance of aValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.network.chat.Componenterror()Returns the value of theerrorrecord component.static <T> TextDetailPopup.ValidationResult<T> error(net.minecraft.network.chat.Component error) final inthashCode()Returns a hash code value for this object.static <T> TextDetailPopup.ValidationResult<T> ok(T value) final StringtoString()Returns a string representation of this record class.booleanvalid()Returns the value of thevalidrecord component.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ValidationResult
public ValidationResult(boolean valid, @Nullable T value, @Nullable @Nullable net.minecraft.network.chat.Component error) Creates an instance of aValidationResultrecord class.- Parameters:
valid- the value for thevalidrecord componentvalue- the value for thevaluerecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
ok
-
error
public static <T> TextDetailPopup.ValidationResult<T> error(net.minecraft.network.chat.Component error) -
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. -
valid
public boolean valid()Returns the value of thevalidrecord component.- Returns:
- the value of the
validrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
error
@Nullable public @Nullable net.minecraft.network.chat.Component error()Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-