From issues-return-10586-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Sat Nov 07 08:41:57 2009 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 41614 invoked from network); 7 Nov 2009 08:41:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Nov 2009 08:41:56 -0000 Received: (qmail 57953 invoked by uid 500); 7 Nov 2009 08:41:56 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 57862 invoked by uid 500); 7 Nov 2009 08:41:55 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 57852 invoked by uid 99); 7 Nov 2009 08:41:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Nov 2009 08:41:55 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Nov 2009 08:41:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8921B234C052 for ; Sat, 7 Nov 2009 00:41:32 -0800 (PST) Message-ID: <934883712.1257583292559.JavaMail.jira@brutus> Date: Sat, 7 Nov 2009 08:41:32 +0000 (UTC) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-386) LeftOf/RightOfNumber in Range convenience methods necessary In-Reply-To: <1234532.1198525303018.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774576#action_12774576 ] Henri Yandell commented on LANG-386: ------------------------------------ elementBefore and elementAfter methods have been added as a part of LANG-551. No positionOf type method as yet. > LeftOf/RightOfNumber in Range convenience methods necessary > ----------------------------------------------------------- > > Key: LANG-386 > URL: https://issues.apache.org/jira/browse/LANG-386 > Project: Commons Lang > Issue Type: New Feature > Affects Versions: 2.3 > Reporter: Michael Osipov > Fix For: 3.0 > > > I've using Ranges recently and found then insufficent in methods. > I cand check if my numbers is in the Range or not but I cant check on which side of the Range it is. > This is my idea: > Range range = new Range(0,5); > boolean outsided = range.leftOfInteger(-5); > outsided equals true > boolean outsided = range.leftOfInteger(5); > outsided equals tfase > same applies for rightOf > another convenience method would be: > create 3 final static int field: > Range.LEFT_OF = -1; > Range.INSIDE = 0; > Range.RIGHT_OF = 1; > range.positionOfInteger(-2) returns LEFT_OF > and so forth > it is some refactoring of contains and the upper methods. > it would increase functionality -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.