Showing
2 changed files
with
24 additions
and
0 deletions
... | @@ -5,6 +5,9 @@ package org.onlab.onos.net.flow; | ... | @@ -5,6 +5,9 @@ package org.onlab.onos.net.flow; |
5 | */ | 5 | */ |
6 | public interface FlowEntry extends FlowRule { | 6 | public interface FlowEntry extends FlowRule { |
7 | 7 | ||
8 | + | ||
9 | + FlowId id(); | ||
10 | + | ||
8 | /** | 11 | /** |
9 | * Returns the number of milliseconds this flow rule has been applied. | 12 | * Returns the number of milliseconds this flow rule has been applied. |
10 | * | 13 | * | ... | ... |
1 | +package org.onlab.onos.net.flow; | ||
2 | + | ||
3 | +/** | ||
4 | + * Representation of a Flow ID. | ||
5 | + */ | ||
6 | +public final class FlowId { | ||
7 | + | ||
8 | + private final int flowid; | ||
9 | + | ||
10 | + private FlowId(int id) { | ||
11 | + this.flowid = id; | ||
12 | + } | ||
13 | + | ||
14 | + public FlowId valueOf(int id) { | ||
15 | + return new FlowId(id); | ||
16 | + } | ||
17 | + | ||
18 | + public int value() { | ||
19 | + return flowid; | ||
20 | + } | ||
21 | +} |
-
Please register or login to post a comment