blob: 6ac323125affc5ef695c25da2c51c2477d52aa60 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
Ray Milkey269ffb92014-04-03 14:43:30 -07002 * 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 **/
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080017
18package net.floodlightcontroller.core.util;
19
20public class MutableInteger extends Number {
21 private static final long serialVersionUID = 1L;
22 int mutableInt;
Ray Milkey269ffb92014-04-03 14:43:30 -070023
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080024 public MutableInteger(int value) {
25 this.mutableInt = value;
26 }
Ray Milkey269ffb92014-04-03 14:43:30 -070027
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080028 public void setValue(int value) {
29 this.mutableInt = value;
30 }
Ray Milkey269ffb92014-04-03 14:43:30 -070031
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080032 @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}