brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m4rkmckenna <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #813: Added highlights to policy endpoint
Date Tue, 12 Sep 2017 17:14:54 GMT
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 


---

Mime
View raw message