Skip to content

Commit

Permalink
do not use java.awt.Point
Browse files Browse the repository at this point in the history
  • Loading branch information
tonivade committed Jun 8, 2024
1 parent 2a3940b commit 7abd612
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.awt.Point;
import org.junit.jupiter.api.Test;
import com.github.tonivade.purefun.Kind;
import com.github.tonivade.purefun.core.Tuple;
Expand All @@ -16,6 +15,8 @@

public class IsoTest {

record Point(int x, int y) {}

private final Iso<Point, Tuple2<Integer, Integer>> pointToTuple =
Iso.of(p -> Tuple.of(p.x, p.y), t -> new Point(t.get1(), t.get2()));
private final Iso<Tuple2<Integer, Integer>, Point> tupleToPoint = pointToTuple.reverse();
Expand Down

0 comments on commit 7abd612

Please sign in to comment.