Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8906477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:39:58+00:00 2026-06-15T02:39:58+00:00

How can I create a Apache Commons Lang 3.1 Range<Inreger> object? The JavaDocs say:

  • 0

How can I create a Apache Commons Lang 3.1 Range<Inreger> object?

The JavaDocs say:

"An immutable range of objects from a minimum to maximum point inclusive."

"The objects need to either be implementations of Comparable or you need to supply a Comparator."

But when I try:

Range<Integer> range = new Range<Integer>(100, 200);

I get an error in my IDE that says required arguments are Integer, Integer, comparator.

Even though Integer implements the Comparable interface and thus I shouldn’t need a extra comparator.

Can someone give me an example of how to construct the above described Range<Integer> object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:40:00+00:00Added an answer on June 15, 2026 at 2:40 am

    The constructor of Range appears to be private so a static method may be the preferred way of constructing the object.

    For example, it looks like you could use the static method between to construct a Range:

    Range.between(100, 200);
    

    However there are other static methods, it just depends what you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Java class CircularFifoBuffer in the package org.apache.commons.collections.buffer is non-generic, and can store objects
I'm trying to create a vector object by importing org.apache.commons.math3.geometry.Vector . Which confuses me
I'm trying to create a virtual host in apache so I can access a
One can create an anonymous object that is initialized through constructor parameters, such as
Why import org.apache.commons.lang.StringUtils cannot be imported in android by default. Do i have to
I have: ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 I just downloaded Commons HttpClient 3.1 (legacy) from http://hc.apache.org/downloads.cgi
In Grails I can create domain objects to a H2 in memory dataSource in
I've used org.apache.commons.net.ftp.FtpClient to create a reliable FTP class that should download multiple files
I'm trying to send a file base64-encoded via apache.commons.mail and I just can't seam
The Apache module auth_tkt creates authentication cookies that can be verified cryptographically so a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.