public final class AggregateVersion
extends org.fuin.objects4j.vo.AbstractIntegerValueObject
| Constructor and Description |
|---|
AggregateVersion(@NotNull @Min(value=0L) java.lang.Integer version)
Constructor with value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
asBaseType() |
static boolean |
isValid(java.lang.Integer value)
Returns the information if a given integer is a valid version.
|
static boolean |
isValid(java.lang.String value)
Returns the information if a given string is a valid version.
|
static void |
requireArgValid(@NotNull java.lang.String name,
java.lang.Integer value)
Verifies if the argument is valid and throws an exception if this is not the case.
|
static void |
requireArgValid(@NotNull java.lang.String name,
java.lang.String value)
Verifies if the argument is valid and throws an exception if this is not the case.
|
static AggregateVersion |
valueOf(java.lang.Integer value)
Parses a version identifier.
|
static AggregateVersion |
valueOf(java.lang.String value)
Parses a version identifier.
|
public AggregateVersion(@NotNull @Min(value=0L)
@NotNull @Min(value=0L) java.lang.Integer version)
version - Version.public final java.lang.Integer asBaseType()
public static boolean isValid(java.lang.Integer value)
value - Value to check. A null value returns true.public static boolean isValid(java.lang.String value)
value - Value to check. A null value returns true.public static AggregateVersion valueOf(java.lang.Integer value)
value - Value to convert. A null value returns null.public static AggregateVersion valueOf(java.lang.String value)
value - Value to convert. A null value returns null.public static void requireArgValid(@NotNull
@NotNull java.lang.String name,
@Nullable
java.lang.Integer value)
throws org.fuin.objects4j.common.ConstraintViolationException
name - Name of the value for a possible error message.value - Value to check.org.fuin.objects4j.common.ConstraintViolationException - The value was not valid.public static void requireArgValid(@NotNull
@NotNull java.lang.String name,
@Nullable
java.lang.String value)
throws org.fuin.objects4j.common.ConstraintViolationException
name - Name of the value for a possible error message.value - Value to check.org.fuin.objects4j.common.ConstraintViolationException - The value was not valid.Copyright © 2019 fuin.org (Germany). All Rights Reserved.