java - Need help storing/retrieveing data -
a user has arraylist of numbers. numbers correspond applications have access to. applications have different entitlement numbers(ie- 3, 72, etc.). want store data in map when user logs in, can input numbers map , applications entitled to. however, applications require 2 3 entitlement numbers. example, 1 entry be: ("101 , 234", "application 1"). wondering if there ideal way of retrieving of values map that users entitlement numbers satisfies.
how have it, program compares users data each application , confirms or denies access. seems inefficient. appreciated!
note: reading applications , numbers in xml, can store them wish.
if there large numbers of numbers required per application, best approach use set intersection. if numbers contiguous or @ least dense, can optimize bitset. 1 or 2 numbers though, i'd recommend testing each number individually, since it's faster full set operations.
Comments
Post a Comment