1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License 15 */ 16 17 package com.google.android.tv.partner.support; 18 19 20 21 /** 22 * Hand copy of generated Autovalue class. 23 * 24 * TODO get autovalue working 25 */ 26 final class AutoValue_EpgInput extends EpgInput { 27 28 private final long id; 29 private final String inputId; 30 private final String lineupId; 31 32 AutoValue_EpgInput( 33 long id, 34 String inputId, 35 String lineupId) { 36 this.id = id; 37 if (inputId == null) { 38 throw new NullPointerException("Null inputId"); 39 } 40 this.inputId = inputId; 41 if (lineupId == null) { 42 throw new NullPointerException("Null lineupId"); 43 } 44 this.lineupId = lineupId; 45 } 46 47 @Override 48 public long getId() { 49 return id; 50 } 51 52 @Override 53 public String getInputId() { 54 return inputId; 55 } 56 57 @Override 58 public String getLineupId() { 59 return lineupId; 60 } 61 62 @Override 63 public String toString() { 64 return "EpgInput{" 65 + "id=" + id + ", " 66 + "inputId=" + inputId + ", " 67 + "lineupId=" + lineupId 68 + "}"; 69 } 70 71 @Override 72 public boolean equals(Object o) { 73 if (o == this) { 74 return true; 75 } 76 if (o instanceof EpgInput) { 77 EpgInput that = (EpgInput) o; 78 return (this.id == that.getId()) 79 && (this.inputId.equals(that.getInputId())) 80 && (this.lineupId.equals(that.getLineupId())); 81 } 82 return false; 83 } 84 85 @Override 86 public int hashCode() { 87 int h$ = 1; 88 h$ *= 1000003; 89 h$ ^= (int) ((id >>> 32) ^ id); 90 h$ *= 1000003; 91 h$ ^= inputId.hashCode(); 92 h$ *= 1000003; 93 h$ ^= lineupId.hashCode(); 94 return h$; 95 } 96 97 } 98