blob: c7c44cb08d1bc7175575502e5d41d527c6511b89 [file] [log] [blame]
package org.onlab.onos.net.flow;
import com.google.common.base.Objects;
/**
* Representation of a Flow ID.
*/
public final class FlowId {
private final long flowid;
private FlowId(long id) {
this.flowid = id;
}
public static FlowId valueOf(int id) {
return new FlowId(id);
}
public long value() {
return flowid;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj.getClass() == this.getClass()) {
FlowId that = (FlowId) obj;
return Objects.equal(this.flowid, that.flowid);
}
return false;
}
@Override
public int hashCode() {
return Objects.hashCode(this.flowid);
}
}