LCOV - code coverage report
Current view: top level - extensions/common - LabelInfo.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 13 15 86.7 %
Date: 2022-11-19 15:00:39 Functions: 2 3 66.7 %

          Line data    Source code
       1             : // Copyright (C) 2014 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.extensions.common;
      16             : 
      17             : import java.util.List;
      18             : import java.util.Map;
      19             : import java.util.Objects;
      20             : 
      21         103 : public class LabelInfo {
      22             :   public AccountInfo approved;
      23             :   public AccountInfo rejected;
      24             :   public AccountInfo recommended;
      25             :   public AccountInfo disliked;
      26             :   public List<ApprovalInfo> all;
      27             : 
      28             :   public Map<String, String> values;
      29             : 
      30             :   public String description;
      31             :   public Short value;
      32             :   public Short defaultValue;
      33             :   public Boolean optional;
      34             :   public Boolean blocking;
      35             : 
      36             :   @Override
      37             :   public boolean equals(Object o) {
      38           1 :     if (o instanceof LabelInfo) {
      39           1 :       LabelInfo labelInfo = (LabelInfo) o;
      40           1 :       return Objects.equals(approved, labelInfo.approved)
      41           1 :           && Objects.equals(rejected, labelInfo.rejected)
      42           1 :           && Objects.equals(recommended, labelInfo.recommended)
      43           1 :           && Objects.equals(disliked, labelInfo.disliked)
      44           1 :           && Objects.equals(all, labelInfo.all)
      45           1 :           && Objects.equals(values, labelInfo.values)
      46           1 :           && Objects.equals(value, labelInfo.value)
      47           1 :           && Objects.equals(defaultValue, labelInfo.defaultValue)
      48           1 :           && Objects.equals(optional, labelInfo.optional)
      49           1 :           && Objects.equals(blocking, labelInfo.blocking);
      50             :     }
      51           0 :     return false;
      52             :   }
      53             : 
      54             :   @Override
      55             :   public int hashCode() {
      56           0 :     return Objects.hash(
      57             :         approved,
      58             :         rejected,
      59             :         recommended,
      60             :         disliked,
      61             :         all,
      62             :         values,
      63             :         value,
      64             :         defaultValue,
      65             :         optional,
      66             :         blocking);
      67             :   }
      68             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750