void setPolicyInfo ( Collection < PolicyInfo > all ) throws IOException { this . all = all ; this . pathToPolicy . clear ( ) ; // keep a reverse map from all top-level paths to policies for ( PolicyInfo pinfo : all ) { pathToPolicy . add ( new PathToPolicy ( pinfo . getSrcPath ( ) , pinfo ) ) ; for ( PathInfo d : pinfo . getDestPaths ( ) ) { pathToPolicy . add ( new PathToPolicy ( d . rpath , pinfo ) ) ; } } // keep all paths sorted in revere lexicographical order so that // we longest path is first. Comparator < PathToPolicy > comp = new Comparator < PathToPolicy > ( ) { public int compare ( PathToPolicy p1 , PathToPolicy p2 ) { return 0 - p1 . spath . compareTo ( p2 . spath ) ; } } ; Collections . sort ( pathToPolicy , comp ) ; }
The list of all configured policies .