Here you can find the source of between(int column, int line, int startCol, int startLine, int endCol, int endLine)
public static boolean between(int column, int line, int startCol, int startLine, int endCol, int endLine)
//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; } }