svn-gvsig-desktop / tags / v1_0_2_Build_906 / applications / appgvSIG / src / com / vividsolutions / jump / util / Counter.java @ 10972
History | View | Annotate | Download (1.47 KB)
1 | 312 | fernando | |
---|---|---|---|
2 | /*
|
||
3 | * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI
|
||
4 | * for visualizing and manipulating spatial features with geometry and attributes.
|
||
5 | *
|
||
6 | * Copyright (C) 2003 Vivid Solutions
|
||
7 | *
|
||
8 | * This program is free software; you can redistribute it and/or
|
||
9 | * modify it under the terms of the GNU General Public License
|
||
10 | * as published by the Free Software Foundation; either version 2
|
||
11 | * of the License, or (at your option) any later version.
|
||
12 | *
|
||
13 | * This program is distributed in the hope that it will be useful,
|
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
16 | * GNU General Public License for more details.
|
||
17 | *
|
||
18 | * You should have received a copy of the GNU General Public License
|
||
19 | * along with this program; if not, write to the Free Software
|
||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
21 | *
|
||
22 | * For more information, contact:
|
||
23 | *
|
||
24 | * Vivid Solutions
|
||
25 | * Suite #1A
|
||
26 | * 2328 Government Street
|
||
27 | * Victoria BC V8T 5G5
|
||
28 | * Canada
|
||
29 | *
|
||
30 | * (250)385-6040
|
||
31 | * www.vividsolutions.com
|
||
32 | */
|
||
33 | |||
34 | package com.vividsolutions.jump.util; |
||
35 | |||
36 | |||
37 | /**
|
||
38 | * A Counter used for example in Maps to count the number of times
|
||
39 | * an item occurs.
|
||
40 | */
|
||
41 | public class Counter { |
||
42 | private int value = 0; |
||
43 | |||
44 | public Counter() {
|
||
45 | } |
||
46 | |||
47 | public Counter(int value) { |
||
48 | this.value = value;
|
||
49 | } |
||
50 | |||
51 | public int getValue() { |
||
52 | return value;
|
||
53 | } |
||
54 | |||
55 | public void increment() { |
||
56 | value++; |
||
57 | } |
||
58 | } |