ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/Phaser.java
(Generate patch)

Comparing jsr166/src/jsr166y/Phaser.java (file contents):
Revision 1.15 by jsr166, Tue Jul 21 18:11:44 2009 UTC vs.
Revision 1.17 by jsr166, Thu Jul 23 19:25:45 2009 UTC

# Line 175 | Line 175 | import java.lang.reflect.*;
175   * parties result in IllegalStateExceptions. However, you can and
176   * should create tiered phasers to accommodate arbitrarily large sets
177   * of participants.
178 + *
179 + * @since 1.7
180 + * @author Doug Lea
181   */
182   public class Phaser {
183      /*
# Line 212 | Line 215 | public class Phaser {
215      }
216  
217      private static int partiesOf(long s) {
218 <        return ((int)s) >>> 16;
218 >        return ((int) s) >>> 16;
219      }
220  
221      private static int phaseOf(long s) {
222 <        return (int)(s >>> 32);
222 >        return (int) (s >>> 32);
223      }
224  
225      private static int arrivedOf(long s) {
# Line 224 | Line 227 | public class Phaser {
227      }
228  
229      private static long stateFor(int phase, int parties, int unarrived) {
230 <        return ((((long)phase) << 32) | (((long)parties) << 16) |
231 <                (long)unarrived);
230 >        return ((((long) phase) << 32) | (((long) parties) << 16) |
231 >                (long) unarrived);
232      }
233  
234      private static long trippedStateFor(int phase, int parties) {
235 <        long lp = (long)parties;
236 <        return (((long)phase) << 32) | (lp << 16) | lp;
235 >        long lp = (long) parties;
236 >        return (((long) phase) << 32) | (lp << 16) | lp;
237      }
238  
239      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines