Code example for LongSparseArray

0
			groupMems.add((GroupMembership) model);
		} 
		// } 
	} 
 
	private final LongSparseArray<Group> groups = new LongSparseArray<Group>();
 
	public LongSparseArray<Group> getGroups() {
		return groups;
	} 
 
	@Override 
	public <JoinModel extends BelongsTo, TargetModel extends HasMany> void add( 
			Class<JoinModel> klass, TargetModel model) {
		if (GroupMembership.class.equals(klass) && model instanceof Group) {
			groups.put(model.getPrimaryId(), (Group) model);
		} 
	} 
 
	@Override 
	public String toString() {