Skip to content

Instantly share code, notes, and snippets.

@Rikkola
Created May 17, 2012 11:47
Show Gist options
  • Save Rikkola/2718361 to your computer and use it in GitHub Desktop.
Save Rikkola/2718361 to your computer and use it in GitHub Desktop.
public GenericActivityMapper implements ActivityMapper {
Map<Place,Activity> activites = new HashMap<String,Activity>;
@Inject
void initServices(@Any Instance<Activity> activities) {
for (Activity activity: activities) {
activites.put(activitity.getPlace(),activity);
}
}
public Activity getActivity( Place place ){
return activities.getPlace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment