public class ValidationResult extends Object
构造器和说明 |
---|
ValidationResult() |
限定符和类型 | 方法和说明 |
---|---|
static ValidationResult |
fail(String message) |
static ValidationResult |
fail(String code,
String message) |
static ValidationResult |
ok() |
static ValidationResult |
ok(String code) |
void |
throwIfInvalid() |
void |
throwIfInvalid(String fieldName) |
<T,R> void |
throwIfInvalid(TypeFunction<T,R> function) |
void |
throwMessage(String msg) |
public static ValidationResult ok()
public static ValidationResult ok(String code)
public static ValidationResult fail(String message)
public static ValidationResult fail(String code, String message)
public void throwIfInvalid()
public void throwIfInvalid(String fieldName)
public <T,R> void throwIfInvalid(TypeFunction<T,R> function)
public void throwMessage(String msg)
Copyright © 2019. All rights reserved.