Java Integer Between between(int value, int min, int max)

Here you can find the source of between(int value, int min, int max)

Description

Checks if value is (inclusively) between min and max.

License

Apache License

Parameter

Parameter Description
value a parameter
min a parameter
max a parameter

Declaration

public static boolean between(int value, int min, int max) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from  w  w w  . j ava  2s  .  co  m*/
     * Checks if value is (inclusively) between min and max.
     * 
     * @param value
     * @param min
     * @param max
     * @return
     */
    public static boolean between(int value, int min, int max) {
        return value >= min && value <= max;
    }

    /**
     * @param value
     * @param min
     * @param max
     */
    public static boolean between(double value, double min, double max) {
        return value >= min && value <= max;
    }
}

Related

  1. between(int column, int line, int startCol, int startLine, int endCol, int endLine)
  2. between(int coord, int limit)
  3. between(int floor, int x, int ceiling)
  4. between(int number, int from, int to)
  5. between(int value, int lower, int upper)
  6. between(int value, int min, int max)
  7. between(int x, int a, int b)