Class RulesVersion
java.lang.Object
software.amazon.smithy.rulesengine.language.RulesVersion
- All Implemented Interfaces:
Comparable<RulesVersion>
Represents the rules engine version with major and minor components.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(RulesVersion other) boolean
int
getMajor()
Gets the major version component.int
getMinor()
Gets the minor version component.int
hashCode()
boolean
isAtLeast
(RulesVersion other) Checks if this version is at least the specified version.static RulesVersion
of
(int major, int minor) Creates a RulesVersion from components.static RulesVersion
Creates a RulesVersion from a string representation.toString()
-
Field Details
-
V1_0
-
V1_1
-
-
Method Details
-
of
Creates a RulesVersion from a string representation.- Parameters:
version
- the version string (e.g., "1.0", "1.2")- Returns:
- the RulesVersion instance
- Throws:
IllegalArgumentException
- if the version string is invalid
-
of
Creates a RulesVersion from components.- Parameters:
major
- the major versionminor
- the minor version- Returns:
- the RulesVersion instance
-
getMajor
public int getMajor()Gets the major version component.- Returns:
- the major version
-
getMinor
public int getMinor()Gets the minor version component.- Returns:
- the minor version
-
isAtLeast
Checks if this version is at least the specified version.- Parameters:
other
- the version to compare against- Returns:
- true if this version >= other
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RulesVersion>
-
equals
-
hashCode
public int hashCode() -
toString
-