axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change
on this file since 866c983 was
8780cbec,
checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago
|
ABAC sources from Cobham
|
-
Property mode set to
100644
|
File size:
798 bytes
|
Rev | Line | |
---|
[8780cbec] | 1 | package edu.stanford.rt.datatype; |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * @author Ninghui Li, Sandra Qiu<br> |
---|
| 5 | * |
---|
| 6 | * Implementation of <code>IntegerValue</code> element. |
---|
| 7 | */ |
---|
| 8 | public class IntegerValue implements DataValue |
---|
| 9 | { |
---|
| 10 | private long value; |
---|
| 11 | |
---|
| 12 | /** |
---|
| 13 | * Constructor for IntegerValue. |
---|
| 14 | */ |
---|
| 15 | public IntegerValue(long v) |
---|
| 16 | { |
---|
| 17 | value = v; |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | /** |
---|
| 21 | * Constructor for IntegerValue. |
---|
| 22 | */ |
---|
| 23 | public IntegerValue(String v) |
---|
| 24 | { |
---|
| 25 | value = (Long.getLong(v)).longValue(); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | /** |
---|
| 30 | * Method getValue. |
---|
| 31 | * @return long |
---|
| 32 | */ |
---|
| 33 | public long getValue() |
---|
| 34 | { |
---|
| 35 | return value; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | /* (non-Javadoc) |
---|
| 39 | * @see java.lang.Object#toString() |
---|
| 40 | */ |
---|
| 41 | public String toString() |
---|
| 42 | { |
---|
| 43 | return String.valueOf(value); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.