public Identifier(String name, Point location) { this.name = (name == null ? "" : name); this.location = (location == null ? Point.emptyPoint() : location); }
private Map<String, MetricValue> getMap(Point point) { if (point == null) { point = Point.emptyPoint(); } if (! perPointData.containsKey(point)) { perPointData.put(point, new HashMap<>()); } return perPointData.get(point); }
/** * Create a new Point instance using the settings stored in this * PointBuilder. PointBuilder instances cannot be re-used after build() has * been invoked. * * @return a Point instance reflecting this builder */ public Point build() { Point p = Point.emptyPoint(); int size = dimensions.size(); if (size != 0) { p = new Point(dimensions.toArray(new String[size]), location.toArray(new Value[size])); } // deny builder re-use dimensions = null; location = null; return p; }