Class Version

  • All Implemented Interfaces:

    public class Version
    extends java.lang.Object
    implements java.lang.Comparable<Version>
    This class allows us to compare contract versions. It uses semantic version comparison. Class implements Comparable interface. This class was taken from here: Solution provided by:
    • Constructor Summary

      Constructor Description
      Version​(java.lang.String version)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(Version that)  
      boolean equals​(java.lang.Object that)  
      java.lang.String get()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Version

        public Version​(java.lang.String version)
    • Method Detail

      • get

        public final java.lang.String get()
      • compareTo

        public int compareTo​(Version that)
        Specified by:
        compareTo in interface java.lang.Comparable<Version>
      • equals

        public boolean equals​(java.lang.Object that)
        equals in class java.lang.Object