113 */
114 public SnmpInt(boolean v) {
115 value = v ? 1 : 2 ;
116 }
117
118 // PUBLIC METHODS
119 //---------------
120 /**
121 * Returns the long value of this <CODE>SnmpInt</CODE>.
122 * @return The value.
123 */
124 public long longValue() {
125 return value ;
126 }
127
128 /**
129 * Converts the integer value to its <CODE>Long</CODE> form.
130 * @return The <CODE>Long</CODE> representation of the value.
131 */
132 public Long toLong() {
133 return new Long(value) ;
134 }
135
136 /**
137 * Converts the integer value to its integer form.
138 * @return The integer representation of the value.
139 */
140 public int intValue() {
141 return (int) value ;
142 }
143
144 /**
145 * Converts the integer value to its <CODE>Integer</CODE> form.
146 * @return The <CODE>Integer</CODE> representation of the value.
147 */
148 public Integer toInteger() {
149 return new Integer((int)value) ;
150 }
151
152 /**
153 * Converts the integer value to its <CODE>String</CODE> form.
|
113 */
114 public SnmpInt(boolean v) {
115 value = v ? 1 : 2 ;
116 }
117
118 // PUBLIC METHODS
119 //---------------
120 /**
121 * Returns the long value of this <CODE>SnmpInt</CODE>.
122 * @return The value.
123 */
124 public long longValue() {
125 return value ;
126 }
127
128 /**
129 * Converts the integer value to its <CODE>Long</CODE> form.
130 * @return The <CODE>Long</CODE> representation of the value.
131 */
132 public Long toLong() {
133 return value;
134 }
135
136 /**
137 * Converts the integer value to its integer form.
138 * @return The integer representation of the value.
139 */
140 public int intValue() {
141 return (int) value ;
142 }
143
144 /**
145 * Converts the integer value to its <CODE>Integer</CODE> form.
146 * @return The <CODE>Integer</CODE> representation of the value.
147 */
148 public Integer toInteger() {
149 return new Integer((int)value) ;
150 }
151
152 /**
153 * Converts the integer value to its <CODE>String</CODE> form.
|