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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:34:23+00:00 2026-06-07T22:34:23+00:00

Is this by design ? Map<String, Map<String, String>> rowMap = treeTable.rowMap(); Map<String, String> notSortedTreeRow

  • 0

Is this by design ?

Map<String, Map<String, String>> rowMap = treeTable.rowMap();
Map<String, String> notSortedTreeRow = rowMap.get(rowId);

so that you can have rowMap sorted (as SortedMap) but you can’t have sorted notSortedTreeRow (TreeRow) which is [column, value] ?

EDIT: It was my fault, I had a String representation of Integers and I was on the impression that numerical Strings were compared based on the numerical value 🙂

Something like this if I oversimplify it:

TreeBasedTable<String, String, String> table = TreeBasedTable.create();

table.put("1", "8", "x");
table.put("1", "9", "x");
table.put("1", "10", "x");

Map<String,String> map = table.rowMap().get("1");
  • 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-07T22:34:25+00:00Added an answer on June 7, 2026 at 10:34 pm

    Just do:

    SortedMap<String, String> sortedRow = (SortedMap<String, String>) rowMap.get(rowId);
    

    as it is TreeRow object instance, which is SortedMap. It is guarateed by RowSortedTable interface, and it does not override Table’s rowMap argument, because it is not possible in Java.

    EDIT:

    Answering original question here:

    Is this by design?

    Yes, it’s by Java’s design.

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

Sidebar

Related Questions

I have this design which I cannot seem to get right, I would like
I'm not massively familiar with this design but I am hoping to get some
SO: I've spent a number of hours tackling this design problem but can't seem
I need to make this design: http://www.stephburningham.com/lmg/ into a joomla template but I've never
How would I draw up this design in a database? A product can be
I have tough time making this design decision. I could go with traditional new
I have this DB design: CREATE TABLE report ( ID MEDIUMINT PRIMARY KEY NOT
I have a C++ key/value table that looks like this: class kvBucket { ...
I am stuck with a design problem that I hope you guys can help
I'm quite a beginner at database design. I have two problems that I'd like

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.