Class PolicyVersion
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.policy.PolicyVersion
-
- All Implemented Interfaces:
Comparable<PolicyVersion>
public final class PolicyVersion extends Object implements Comparable<PolicyVersion>
Representation of XACML VersionType:<xs:simpleType name="VersionType"> <xs:restriction base="xs:string"> <xs:pattern value="(\d+\.)*\d+"/> </xs:restriction> </xs:simpleType>
-
-
Constructor Summary
Constructors Modifier Constructor Description PolicyVersion(String version)
Creates instance from version in text formprotected
PolicyVersion(String version, List<Integer> numbers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(PolicyVersion other)
boolean
equals(Object obj)
List<Integer>
getNumberSequence()
Get version as sequence of positive integersint
hashCode()
String
toString()
Return the original version string from which this object was instantiated
-
-
-
Constructor Detail
-
PolicyVersion
public PolicyVersion(String version) throws IllegalArgumentException
Creates instance from version in text form- Parameters:
version
- version string- Throws:
IllegalArgumentException
- if version is null or not valid according to pattern definition in XACML schema: "(\d+\.)*\d+"
-
-
Method Detail
-
compareTo
public int compareTo(PolicyVersion other)
- Specified by:
compareTo
in interfaceComparable<PolicyVersion>
-
toString
public String toString()
Return the original version string from which this object was instantiated
-
-