Record Class TreeNodeValidator.ValidationResult
java.lang.Object
java.lang.Record
cloud.opencode.base.tree.validation.TreeNodeValidator.ValidationResult
- Record Components:
valid- whether valid | 是否有效errors- the error messages | 错误消息列表
- Enclosing class:
TreeNodeValidator
public static record TreeNodeValidator.ValidationResult(boolean valid, List<String> errors)
extends Record
Validation Result
验证结果
- Since:
- JDK 25, opencode-base-tree V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionValidationResult(boolean valid, List<String> errors) Creates an instance of aValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.booleanfinal inthashCode()Returns a hash code value for this object.success()final StringtoString()Returns a string representation of this record class.booleanvalid()Returns the value of thevalidrecord component.
-
Constructor Details
-
ValidationResult
-
-
Method Details
-
success
-
failure
-
hasErrors
public boolean hasErrors() -
getErrorMessage
-
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
-
errors
-