What is a good Map to use for writing Registries

I am not sure if SparseArray is the right kind, but one kind


public class DialogRegistry 
{
   SparseArray<IDialogProtocol> idsToDialogs
   = new SparseArray();
   public void registerDialog(IDialogProtocol dialog)
   {
      idsToDialogs.put(dialog.getDialogId(),dialog);
   }
   
   public Dialog create(int id)
   {
      IDialogProtocol dp = idsToDialogs.get(id);
      if (dp == null) return null;
      
      return dp.create();
   }
   public void prepare(Dialog dialog, int id)
   {
      IDialogProtocol dp = idsToDialogs.get(id);
      if (dp == null)
      {
          throw new 
          RuntimeException("Dialog id is not registered:" + id);
      }
      dp.prepare(dialog);
   }
}

Search for: android API SparseArray