Enum InequalVersionComparisonResult
- java.lang.Object
-
- java.lang.Enum<InequalVersionComparisonResult>
-
- org.infinispan.container.versioning.InequalVersionComparisonResult
-
- All Implemented Interfaces:
Serializable
,Comparable<InequalVersionComparisonResult>
public enum InequalVersionComparisonResult extends Enum<InequalVersionComparisonResult>
Versions can be compared to each other to result in one version being before, after or at the same time as another version. This is different from the JDK'sComparable
interface, which is much more simplistic in that it doesn't differentiate between something that is the same versus equal-but-different.- Since:
- 5.1
- Author:
- Manik Surtani
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AFTER
Denotes a version that was created temporally after another version.BEFORE
Denotes a version that was created temporally before another version.CONFLICTING
Denotes a version that was created at the same time as another version, but is not equal.EQUAL
Denotes that the two versions being compared are equal.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InequalVersionComparisonResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static InequalVersionComparisonResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEFORE
public static final InequalVersionComparisonResult BEFORE
Denotes a version that was created temporally before another version.
-
AFTER
public static final InequalVersionComparisonResult AFTER
Denotes a version that was created temporally after another version.
-
EQUAL
public static final InequalVersionComparisonResult EQUAL
Denotes that the two versions being compared are equal.
-
CONFLICTING
public static final InequalVersionComparisonResult CONFLICTING
Denotes a version that was created at the same time as another version, but is not equal. This is only really useful when using a partition-aware versioning scheme, such as vector or Lamport clocks.
-
-
Method Detail
-
values
public static InequalVersionComparisonResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InequalVersionComparisonResult c : InequalVersionComparisonResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InequalVersionComparisonResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-