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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:41:22+00:00 2026-06-18T12:41:22+00:00

I have a nested treemap based on the following structure, and then it ofc

  • 0

I have a nested treemap based on the following structure, and then it ofc continues from “2”:{ with the same structure..

http://pastebin.com/uKwAVz5L

And as you can see, it is already sorted by the “c13” sub item (episode number).. but when i use the treemap in my applications, it shows up like this:

http://i50.tinypic.com/15o9vno.png

They are not even remotely sorted.. but i cant see why? :O

Its the same problem when using it in my android app..

Cheers

  • 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-18T12:41:23+00:00Added an answer on June 18, 2026 at 12:41 pm

    Here is some valuable infomation on TreeMap:

    Red-Black tree based implementation of the SortedMap interface. This
    class guarantees that the map will be in ascending key order, sorted
    according to the natural order for the key’s class
    (see Comparable),
    or by the comparator provided at creation time, depending on which
    constructor is used.

    Note that the ordering maintained by a sorted map (whether or not an
    explicit comparator is provided) must be consistent with equals if
    this sorted map is to correctly implement the Map interface. (See
    Comparable or Comparator for a precise definition of consistent with
    equals.) This is so because the Map interface is defined in terms of
    the equals operation, but a map performs all key comparisons using its
    compareTo (or compare) method
    , so two keys that are deemed equal by
    this method are, from the standpoint of the sorted map, equal. The
    behavior of a sorted map is well-defined even if its ordering is
    inconsistent with equals; it just fails to obey the general contract
    of the Map interface.

    Have you correctly implemented the methods mentioned above?

    There are also different implementations of the Collections framework (An overview is here). If TreeMap doesn’t provide the functionality you want you can implement another one and modify it to your needs.

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

Sidebar

Related Questions

I have nested list of the following form: my_list = [['Some1', '2', '3.6', '4.5',
I have two nested packages that I am calling via fast_cgi. From the first
In Qt if I have nested QMaps similiar to the following: QMap<int, QMap<int, QMap<int,
I have nested grids in my views and would like to use same CSS
I have nested structure very similar to folder structure, like: Array ( [level_one_1] =>
I have the following situation where I want to have nested ReWrite Conditions, and
If I have nested functions in C#, how to exit from both function at
I have nested edit texts within table layout and then table layout within scroll
I have nested model as following Project model has_many keywords and keyword belongs_to project
i'm working on a app where i have nested tree structure i.e. as below

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.