Class ComparableInputReader<T extends java.lang.Comparable<T>,​B extends ComparableInputReader<T,​B>>

    • Field Detail

      • minVal

        protected T extends java.lang.Comparable<T> minVal
      • maxVal

        protected T extends java.lang.Comparable<T> maxVal
    • Constructor Detail

      • ComparableInputReader

        public ComparableInputReader​(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
    • Method Detail

      • typeNameWithIndefiniteArticle

        protected abstract java.lang.String typeNameWithIndefiniteArticle()
      • withMinVal

        public B withMinVal​(T minVal)
        Configures the minimum allowed value
      • withMaxVal

        public B withMaxVal​(T maxVal)
        Configures the maximum allowed value
      • getMinMaxErrorMessage

        protected java.util.List<java.lang.String> getMinMaxErrorMessage​(T val)
      • isInRange

        public boolean isInRange​(T val)
        Returns true if minVal <= val <= maxVal