I need to get the position of a string in a List in constant time,
but do not find any such Java implementation.
Maybe is there no need for that, given current computers memory size ;-)
LinkedHashMap are interesting but do not maintain a position.(ref)
Any clue ?
A custom implementation could keep a list and a map in parallel. The map containing the strings as keys and their list index as values. Assuming each string occurs only once.