Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 67607200D09 for ; Tue, 12 Sep 2017 19:14:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 660EF1609B4; Tue, 12 Sep 2017 17:14:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AC2B21609C7 for ; Tue, 12 Sep 2017 19:14:56 +0200 (CEST) Received: (qmail 25486 invoked by uid 500); 12 Sep 2017 17:14:55 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 25459 invoked by uid 99); 12 Sep 2017 17:14:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2017 17:14:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1A91EF56DF; Tue, 12 Sep 2017 17:14:54 +0000 (UTC) From: m4rkmckenna To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #813: Added highlights to policy endpoint Content-Type: text/plain Message-Id: <20170912171454.1A91EF56DF@git1-us-west.apache.org> Date: Tue, 12 Sep 2017 17:14:54 +0000 (UTC) archived-at: Tue, 12 Sep 2017 17:14:57 -0000 Github user m4rkmckenna commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/813#discussion_r138407033 --- Diff: api/src/main/java/org/apache/brooklyn/api/objs/HighlightTuple.java --- @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.brooklyn.api.objs; + +public class HighlightTuple { + + private String description; + private long time; + private String taskId; + + //required for JSON de-serialisation + private HighlightTuple(){ + + } + + public HighlightTuple(String description, long time, String taskId) { + this.description = description; + this.time = time; + this.taskId = taskId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public long getTime() { + return time; + } + + public void setTime(long time) { + this.time = time; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + HighlightTuple that = (HighlightTuple) o; --- End diff -- Id personally use guava `Objects.equals`as its already a dependency ---