Here you can find the source of between(long max, long min, long val)
public static final boolean between(long max, long min, long val)
//package com.java2s; //License from project: Open Source License public class Main { public static final boolean between(long max, long min, long val) { if (val >= max || val <= min) return false; else/*ww w .j av a 2 s . co m*/ return true; } public static final boolean between(int max, int min, int val) { if (val >= max || val <= min) return false; else return true; } public static final boolean between(float max, float min, float val) { if (val >= max || val <= min) return false; else return true; } public static final boolean between(double max, double min, double val) { if (val >= max || val <= min) return false; else return true; } }