Java Integer Between between(int column, int line, int startCol, int startLine, int endCol, int endLine)

Here you can find the source of between(int column, int line, int startCol, int startLine, int endCol, int endLine)

Description

between

License

Open Source License

Declaration

public static boolean between(int column, int line, int startCol, int startLine, int endCol, int endLine) 

Method Source Code

//package com.java2s;
/*// www . j  a v a  2  s .c om
 * Copyright 2001-2008 Aqris Software AS. All rights reserved.
 * 
 * This program is dual-licensed under both the Common Development
 * and Distribution License ("CDDL") and the GNU General Public
 * License ("GPL"). You may elect to use one or the other of these
 * licenses.
 */

public class Main {
    public static boolean between(int column, int line, int startCol, int startLine, int endCol, int endLine) {
        if (line < startLine || line > endLine) {
            return false;
        }

        if (line == startLine && column < startCol) {
            return false;
        }

        if (line == endLine && column > endCol) {
            return false;
        }

        return true;
    }
}

Related

  1. between(int coord, int limit)
  2. between(int floor, int x, int ceiling)
  3. between(int number, int from, int to)
  4. between(int value, int lower, int upper)