private void loadSpellsIntoSlots(Player player){
  final List<String> slotsSpells=Arrays.asList("spells");
  for (  String slotName : slotsSpells) {
    RPSlot slot=player.getSlot(slotName);
    List<RPObject> objects=new LinkedList<RPObject>();
    for (    final RPObject objectInSlot : slot) {
      objects.add(objectInSlot);
    }
    slot.clear();
    SpellTransformer transformer=new SpellTransformer();
    for (    RPObject o : objects) {
      Spell s=(Spell)transformer.transform(o);
      if (s != null) {
        slot.add(s);
      }
    }
  }
}

private void loadSpellsIntoSlots ( Player player ) { final List < String > slotsSpells = Arrays . asList ( "spells" ) ; for ( String slotName : slotsSpells ) { RPSlot slot = player . getSlot ( slotName ) ; List < RPObject > objects = new LinkedList < RPObject > ( ) ; for ( final RPObject objectInSlot : slot ) { objects . add ( objectInSlot ) ; } slot . clear ( ) ; SpellTransformer transformer = new SpellTransformer ( ) ; for ( RPObject o : objects ) { Spell s = ( Spell ) transformer . transform ( o ) ; if ( s != null ) { slot . add ( s ) ; } } } }
transforms the rpobjects in the spells slots to the real spell objects
