List of usage examples for org.apache.wicket.util.string AppendingStringBuffer delete
public AppendingStringBuffer delete(final int start, int end)
AppendingStringBuffer. From source file:org.wicketstuff.security.swarm.actions.SwarmActionFactory.java
License:Apache License
/** * Builds a logically ordered comma separated string of all the actions this permission has. * Based on the logical and of the supplied actions. Subclasses should always return the same * string (action order) for the same action. * //from w ww .j a v a2 s. c o m * @param actions * the internal action value * @return string containing all the actions. * */ protected String buildActionString(int actions) { AppendingStringBuffer buff = new AppendingStringBuffer(power > 0 ? 10 * power : 10); // estimate 10 chars per name for (int i = -1; i < power; i++) { appendActionString(buff, actions, registeredIntActions.get(i).actions()); } if (buff.length() > 0) // should always be the case buff.delete(buff.length() - 2, buff.length()); return buff.toString(); }