haifa.shopsim
Class Operation

java.lang.Object
  |
  +--haifa.shopsim.Operation

public final class Operation
extends java.lang.Object

This little class holds and identifies an operation in a job shop (route, step).

Version:
1.1

Field Summary
private  int k
          The step number.
private  int r
          The route number.
private  int ROUTE_ADD
          Used by the hash code generator.
private  int STEP_ADD
          Used by the hash code generator.
 
Constructor Summary
Operation(int r_, int k_)
          Constructs an operation on route r, and step k
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the operation equals obj
 int getRoute()
          Returns the route that identifies the operation.
 int getStep()
          Returns the step that identifies the operation.
 int hashCode()
          Returns a hash code based on the operation.
 java.lang.String toString()
          Returns a string of the operation.
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ROUTE_ADD

private final int ROUTE_ADD
Used by the hash code generator.

STEP_ADD

private final int STEP_ADD
Used by the hash code generator.

r

private int r
The route number.

k

private int k
The step number.
Constructor Detail

Operation

public Operation(int r_,
                 int k_)
Constructs an operation on route r, and step k
Method Detail

toString

public java.lang.String toString()
Returns a string of the operation.
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Returns true if the operation equals obj
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Returns a hash code based on the operation. It is designed so that for most operations within a small range, the hash code is unique
Overrides:
hashCode in class java.lang.Object

getRoute

public final int getRoute()
Returns the route that identifies the operation.

getStep

public final int getStep()
Returns the step that identifies the operation.