Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/IntDataItem.java @ 2535:d0a9acddbea2
Added an int data item used in int array data and added getter that returns
values as colon separated string to all data types.
flys-client/trunk@4445 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 21 May 2012 08:48:16 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2534:05143379059e | 2535:d0a9acddbea2 |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 | |
4 /** | |
5 * The integer implementation of a {@link DataItem}. | |
6 * | |
7 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
8 */ | |
9 public class IntDataItem implements DataItem { | |
10 | |
11 /** The label. */ | |
12 protected String label; | |
13 | |
14 /** The description. */ | |
15 protected String description; | |
16 | |
17 /** The value. */ | |
18 protected int value; | |
19 | |
20 | |
21 public IntDataItem() { | |
22 } | |
23 | |
24 | |
25 /** | |
26 * The default constructor to create new instances. | |
27 * | |
28 * @param label The label. | |
29 * @param description The description. | |
30 * @param value The value. | |
31 */ | |
32 public IntDataItem(String label, String description, int value) { | |
33 this.label = label; | |
34 this.description = description; | |
35 this.value = value; | |
36 } | |
37 | |
38 | |
39 public String getLabel() { | |
40 return label; | |
41 } | |
42 | |
43 | |
44 public String getDescription() { | |
45 return description; | |
46 } | |
47 | |
48 | |
49 public String getStringValue() { | |
50 return String.valueOf(value); | |
51 } | |
52 | |
53 public int getValue() { | |
54 return value; | |
55 } | |
56 } | |
57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |