Class 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 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

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Return the original version string from which this object was instantiated
        Overrides:
        toString in class Object
      • getNumberSequence

        public List<Integer> getNumberSequence()
        Get version as sequence of positive integers
        Returns:
        sequence of positive integers from version