public static Map < Transition , Collection < TileRef > > imports ( Media config ) { final Xml root = new Xml ( config ) ; final Collection < Xml > nodesTransition = root . getChildren ( NODE_TRANSITION ) ; final Map < Transition , Collection < TileRef > > transitions = new HashMap <> ( nodesTransition . size ( ) ) ; for ( final Xml nodeTransition : nodesTransition ) { final String groupIn = nodeTransition . readString ( ATTRIBUTE_GROUP_IN ) ; final String groupOut = nodeTransition . readString ( ATTRIBUTE_GROUP_OUT ) ; final String transitionType = nodeTransition . readString ( ATTRIBUTE_TRANSITION_TYPE ) ; final TransitionType type = TransitionType . from ( transitionType ) ; final Transition transition = new Transition ( type , groupIn , groupOut ) ; final Collection < Xml > nodesTileRef = nodeTransition . getChildren ( TileConfig . NODE_TILE ) ; final Collection < TileRef > tilesRef = importTiles ( nodesTileRef ) ; transitions . put ( transition , tilesRef ) ; } return transitions ; }
Import all transitions from configuration .