Class Index


  • public class Index
    extends java.lang.Object
    A positive index.
    Author:
    Alex Ruiz
    • Field Detail

      • value

        public final int value
    • Method Detail

      • atIndex

        public static Index atIndex​(int value)
        Creates a new Index.
        Parameters:
        value - the value of the index.
        Returns:
        the created Index.
        Throws:
        java.lang.IllegalArgumentException - if the given value is negative.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object