blob: 3dcb64c3733e94b472a68a2b66e6b49731356630 [file] [log] [blame]
package net.onrc.onos.core.matchaction;
import net.onrc.onos.api.batchoperation.BatchOperationTarget;
import java.util.Objects;
/**
* A unique identifier for a MatchAction. Objects of this class are immutable.
*/
public final class MatchActionId implements BatchOperationTarget {
private final long value;
/**
* Creates a new Match Action Identifier based on the given id string.
*
* @param id unique id string
*/
public MatchActionId(long id) {
value = id;
}
@Override
public String toString() {
return Long.toString(value);
}
@Override
public int hashCode() {
return Objects.hashCode(value);
}
@Override
public boolean equals(Object obj) {
if (obj instanceof MatchActionId) {
final MatchActionId that = (MatchActionId) obj;
return this.value == that.value;
}
return false;
}
}