boolean addPermEntry(PolicyEntry pe,PolicyParser.PermissionEntry newPerm,int index){
  PolicyParser.GrantEntry grantEntry=pe.getGrantEntry();
  if (grantEntry.contains(newPerm) == true)   return false;
  Vector<PolicyParser.PermissionEntry> permList=grantEntry.permissionEntries;
  if (index != -1)   permList.setElementAt(newPerm,index);
 else   permList.addElement(newPerm);
  modified=true;
  return true;
}

boolean addPermEntry ( PolicyEntry pe , PolicyParser . PermissionEntry newPerm , int index ) { PolicyParser . GrantEntry grantEntry = pe . getGrantEntry ( ) ; if ( grantEntry . contains ( newPerm ) == true ) return false ; Vector < PolicyParser . PermissionEntry > permList = grantEntry . permissionEntries ; if ( index != - 1 ) permList . setElementAt ( newPerm , index ) ; else permList . addElement ( newPerm ) ; modified = true ; return true ; }
add a permission entry to an existing policyentry at the specified index . a permission entry consists of a permission , name , and actions . if the permission already exists , it is not added again .
