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 780807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:08:00+00:00 2026-05-14T20:08:00+00:00

What I need is something like Hashtable which I will fill with prices that

  • 0

What I need is something like Hashtable which I will fill with prices that were actual at desired days.

For example: I will put two prices: January 1st: 100USD, March 5th: 89USD.

If I search my hashtable for price: hashtable.get(February 14th) I need it to give me back actual price which was entered at Jan. 1st because this is the last actual price. Normal hashtable implementation won’t give me back anything, since there is nothing put on that dat.

I need to see if there is such implementation which can find quickly object based on range of dates.

  • 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-05-14T20:08:00+00:00Added an answer on May 14, 2026 at 8:08 pm

    Off the top of my head, there are a couple ways, but I would use a TreeMap<Date> (or Calendar, etc).

    When you need to pull out a Date date, try the following:

    1. Attempt to get(date)
    2. If the result is null, then the result is in headMap(date).lastKey()

    One of those will work. Of course, check the size of headMap(date) first because lastKey() will throw an Exception if it is empty.

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

Sidebar

Related Questions

Normally, we get first value that way: $(#color option:first).val() But I need something like
What I need is something like this: /<[\w\d]+ ([\w\d]+\=[w\d])+\/>/ Something that would match several
I need something like a 3-dimension (like a list or a map), which I
Supposed there is something like Hashtable created by Hashtable.Synchronized() which is accessed by multiple
I need something like make i.e. dependencies + executing shell commands where failing command
I need something like this http://jonraasch.com/blog/a-simple-jquery-slideshow but w/o the absolute positioning. Is it possible?
I need something like a temporary in-memory key-value store. I know there are solutions
Ok, I need something like this: datediff(second, date_one, date_two) < 1 dates are stored
I want to export a XtraGrid as an image. Pratically i need something like
I need something simple like date , but in seconds since 1970 instead of

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.