commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-386) LeftOf/RightOfNumber in Range convenience methods necessary
Date Sat, 07 Nov 2009 08:41:32 GMT

    [ 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.


Mime
View raw message