Class Index


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

      • value

        public final int value
    • Constructor Detail

      • Index

        private Index​(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:
        IllegalArgumentException - if the given value is negative.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object