forked from sharpie7/circuitjs1
-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid most of analyzeCircuit logic when simulation is stopped (sharpi…
- Loading branch information
Showing
2 changed files
with
67 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.lushprojects.circuitjs1.client; | ||
|
||
import java.util.Objects; | ||
|
||
public class IntPair { | ||
private final int first; | ||
private final int second; | ||
|
||
public IntPair(int first, int second) { | ||
this.first = first; | ||
this.second = second; | ||
} | ||
|
||
public int getFirst() { | ||
return first; | ||
} | ||
|
||
public int getSecond() { | ||
return second; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
IntPair intPair = (IntPair) o; | ||
return first == intPair.first && second == intPair.second; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(first, second); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "(" + first + ", " + second + ")"; | ||
} | ||
} | ||
|