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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:02:24+00:00 2026-05-19T22:02:24+00:00

I am looking into a number of ways to implement a labelling system similar

  • 0

I am looking into a number of ways to implement a labelling system similar to the one in Gmail. Basically I have a Resource at the lowest level and I would like to provide a number of organisational groupings for that resource in the form of labels. If anyone has implemented something like that I would like to hear your views. My idea is to have within the Resource instance a List<Label>. I need to have an efficient mechanism in order to do very fast searches based on the labels or based on the resources.

Thanks
Dimitris

  • 1 1 Answer
  • 1 View
  • 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-19T22:02:25+00:00Added an answer on May 19, 2026 at 10:02 pm

    Nope, I wouldn’t do that. I’d think about maintaining two dictionaries, Label -> HashSet<Resource> and Resource -> HashSet<Label>. This will give you fast lookup in both directions. Obviously you should encapsulate this.

    Also, whatever you do, you shouldn’t embed it in your Resource. It’s a resource, and it’s maintaining its labels? No. Single responsibility and all that.

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

Sidebar

Related Questions

I've been looking into a number of ways to display a large number of
I was looking into random number generators and found pseudo code for one: function
I looking into making a kind of robot testing browser. Like Selenium, but one
I have an interesting problem which I've been looking into and would appreciate some
So, I am looking at a number of ways to store my configuration data.
I'm looking for the best way to basically get a unique number (guaranteed, not
I am looking for ways to split a string into an array, sort of
I have been looking into the options for handling passwords for user login and
I'm looking into the various ways to validate input for an editable JComboBox. Currently,
I've spent a number of days looking into putting up two Windows Servers on

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.