/** * Returns message string for bounds exceptions on arrival. */ private String badArrive(long s) { return "Attempted arrival of unregistered party for " + stateToString(s); }
/** * Returns message string for bounds exceptions on registration. */ private String badRegister(long s) { return "Attempt to register more than " + MAX_PARTIES + " parties for " + stateToString(s); }
/** * Returns a string identifying this phaser, as well as its * state. The state, in brackets, includes the String {@code * "phase = "} followed by the phase number, {@code "parties = "} * followed by the number of registered parties, and {@code * "arrived = "} followed by the number of arrived parties. * * @return a string identifying this phaser, as well as its state */ public String toString() { return stateToString(reconcileState()); }
/** * Returns message string for bounds exceptions on arrival. */ private String badArrive(long s) { return "Attempted arrival of unregistered party for " + stateToString(s); }
/** * Returns message string for bounds exceptions on registration. */ private String badRegister(long s) { return "Attempt to register more than " + MAX_PARTIES + " parties for " + stateToString(s); }
/** * Returns a string identifying this phaser, as well as its * state. The state, in brackets, includes the String {@code * "phase = "} followed by the phase number, {@code "parties = "} * followed by the number of registered parties, and {@code * "arrived = "} followed by the number of arrived parties. * * @return a string identifying this phaser, as well as its state */ public String toString() { return stateToString(reconcileState()); }