boolean addEntry(PolicyEntry pe,int index){
  if (index < 0) {
    policyEntries.addElement(pe);
    parser.add(pe.getGrantEntry());
  }
 else {
    PolicyEntry origPe=policyEntries.elementAt(index);
    parser.replace(origPe.getGrantEntry(),pe.getGrantEntry());
    policyEntries.setElementAt(pe,index);
  }
  return true;
}

boolean addEntry ( PolicyEntry pe , int index ) { if ( index < 0 ) { policyEntries . addElement ( pe ) ; parser . add ( pe . getGrantEntry ( ) ) ; } else { PolicyEntry origPe = policyEntries . elementAt ( index ) ; parser . replace ( origPe . getGrantEntry ( ) , pe . getGrantEntry ( ) ) ; policyEntries . setElementAt ( pe , index ) ; } return true ; }
add a grant entry to the overall policy at the specified index . a policy entry consists of a codesource .
