Record Class MagicPlaceholders.PlaceholderResult
java.lang.Object
java.lang.Record
dev.ua.theroer.magicutils.placeholders.MagicPlaceholders.PlaceholderResult
- Record Components:
value- resolved value (may be null)error- resolution error (null on success)
- Enclosing class:
MagicPlaceholders
-
Constructor Summary
ConstructorsConstructorDescriptionPlaceholderResult(@Nullable String value, @Nullable Throwable error) Creates an instance of aPlaceholderResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable Throwableerror()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.booleansuccess()Returns true when resolution succeeded.final StringtoString()Returns a string representation of this record class.@Nullable Stringvalue()Returns the value of thevaluerecord component.Returns a non-null value or an empty string.
-
Constructor Details
-
PlaceholderResult
-
-
Method Details
-
success
public boolean success()Returns true when resolution succeeded.- Returns:
- true when no error was recorded
-
valueOrEmpty
Returns a non-null value or an empty string.- Returns:
- resolved value or empty string
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
value
-
error
-