MCPcopy Create free account
hub / github.com/MolinDeng/Princeton-algs4 / insert

Method insert

LabEnv/05Lab/PointSET.java:34–37  ·  view source on GitHub ↗
(Point2D p)

Source from the content-addressed store, hash-verified

32
33 // add the point to the set (if it is not already in the set)
34 public void insert(Point2D p) {
35 if (p == null) throw new IllegalArgumentException();
36 treeSet.add(p);
37 }
38
39 // does the set contain point p?
40 public boolean contains(Point2D p) {

Callers 3

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected