• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 Code Intelligence GmbH
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.code_intelligence.jazzer.autofuzz.testdata;
16 
17 import java.util.Objects;
18 
19 public class EmployeeWithSetters {
20   private String firstName;
21   private String lastName;
22   private String jobTitle;
23   private int age;
24 
25   @Override
equals(Object o)26   public boolean equals(Object o) {
27     if (this == o)
28       return true;
29     if (o == null || getClass() != o.getClass())
30       return false;
31     EmployeeWithSetters hero = (EmployeeWithSetters) o;
32     return age == hero.age && Objects.equals(firstName, hero.firstName)
33         && Objects.equals(lastName, hero.lastName) && Objects.equals(jobTitle, hero.jobTitle);
34   }
35 
36   @Override
hashCode()37   public int hashCode() {
38     return Objects.hash(firstName, lastName, jobTitle, age);
39   }
40 
setFirstName(String firstName)41   public void setFirstName(String firstName) {
42     this.firstName = firstName;
43   }
44 
setLastName(String lastName)45   public void setLastName(String lastName) {
46     this.lastName = lastName;
47   }
48 
setJobTitle(String jobTitle)49   public void setJobTitle(String jobTitle) {
50     this.jobTitle = jobTitle;
51   }
52 
setAge(int age)53   public void setAge(int age) {
54     this.age = age;
55   }
56 }
57