blob: 8fbb727cc8850aec35e0a8b4bf8109a70bc85579 [file] [log] [blame]
Pavlin Radoslavov5363c2a2013-02-18 09:55:42 -08001package net.floodlightcontroller.util;
2
3/**
4 * The class representing a network port of a switch.
5 */
6public class Port {
7 private short value;
8
9 /**
10 * Default constructor.
11 */
12 public Port() {
13 this.value = 0;
14 }
15
16 /**
17 * Constructor from a long value.
18 *
19 * @param value the value to use.
20 */
21 public Port(short value) {
22 this.value = value;
23 }
24
25 /**
26 * Get the value of the port.
27 *
28 * @return the value of the port.
29 */
30 public short value() { return value; }
31
32 /**
33 * Set the value of the port.
34 *
35 * @param value the value to set.
36 */
37 public void setValue(short value) {
38 this.value = value;
39 }
40
41 /**
42 * Convert the port value to a string.
43 *
44 * @return the port value as a string.
45 */
46 @Override
47 public String toString() {
48 String ret = "";
49 // TODO: Implement it!
50 return ret;
51 }
52}