Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: remoting/android/javatests/src/org/chromium/chromoting/Counter.java

Issue 1999583002: Add Event and EventTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chromoting;
6
7 /**
8 * A pointer of an integer, users can {@link set} / {@link get} / {@link increme nt} /
9 * {@link decrement} to its value. This class is usually useful in test cases. T his class is not
10 * thread-safe, for a thread-safe implementation, use
Lambros 2016/05/27 22:26:07 Grammar nit: Replace first , with ;
Hzj_jie 2016/05/28 00:32:07 Done.
11 * {@link java.util.concurrent.atomic.AtomicInteger}.
12 */
13 public class Counter {
Lambros 2016/05/27 22:26:07 Put this in a 'util' sub-package, and maybe call i
Hzj_jie 2016/05/28 00:32:07 Done.
14 private int mV;
Lambros 2016/05/27 22:26:07 'mValue' preferred (and 'value' for parameters). I
Hzj_jie 2016/05/28 00:32:07 Done.
15
16 public Counter() {
17 set(0);
18 }
19
20 public void increment() {
21 mV++;
22 }
23
24 public void decrement() {
25 mV--;
26 }
27
28 public void set(int v) {
29 mV = v;
30 }
31
32 public int get() {
33 return mV;
34 }
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698