public ICharm[] getExperienceLearnedCharms() {
   List<ICharm> allLearnedCharms = new ArrayList<ICharm>();
   for (ILearningCharmGroup group : getAllGroups()) {
     Collections.addAll(allLearnedCharms, group.getExperienceLearnedCharms());
   }
   return allLearnedCharms.toArray(new ICharm[allLearnedCharms.size()]);
 }
Example #2
0
 @Override
 public ICharm[] getLearnedCharms(boolean experienced) {
   List<ICharm> allLearnedCharms = new ArrayList<ICharm>();
   for (ILearningCharmGroup group : getAllGroups()) {
     Collections.addAll(allLearnedCharms, group.getCreationLearnedCharms());
     if (experienced) {
       Collections.addAll(allLearnedCharms, group.getExperienceLearnedCharms());
     }
   }
   return allLearnedCharms.toArray(new ICharm[allLearnedCharms.size()]);
 }