com.github.martinfrank.drawlib.Points Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of drawlib Show documentation
Show all versions of drawlib Show documentation
this project provides a draw library
The newest version!
package com.github.martinfrank.drawlib;
import java.util.HashMap;
public class Points {
private java.util.Map internalPointsRepresentation = new HashMap<>();
public Point get(Point point) {
Point p = internalPointsRepresentation.get(point.hashCode());
if (p == null) {
internalPointsRepresentation.put(point.hashCode(), point);
return point;
}
return p;
}
public int size() {
return internalPointsRepresentation.size();
}
}