blob: 0f070fa659e59f1efb397be2b11c9d9193095b36 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
2* Copyright 2011, Big Switch Networks, Inc.
3* Originally created by David Erickson, Stanford University
4*
5* Licensed under the Apache License, Version 2.0 (the "License"); you may
6* not use this file except in compliance with the License. You may obtain
7* a copy of the License at
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14* License for the specific language governing permissions and limitations
15* under the License.
16**/
17
18package net.floodlightcontroller.core.util;
19
20public class MutableInteger extends Number {
21 private static final long serialVersionUID = 1L;
22 int mutableInt;
23
24 public MutableInteger(int value) {
25 this.mutableInt = value;
26 }
27
28 public void setValue(int value) {
29 this.mutableInt = value;
30 }
31
32 @Override
33 public double doubleValue() {
34 return (double) mutableInt;
35 }
36
37 @Override
38 public float floatValue() {
39 // TODO Auto-generated method stub
40 return (float) mutableInt;
41 }
42
43 @Override
44 public int intValue() {
45 // TODO Auto-generated method stub
46 return mutableInt;
47 }
48
49 @Override
50 public long longValue() {
51 // TODO Auto-generated method stub
52 return (long) mutableInt;
53 }
54
55}