package edu.brown.cs.student.term.hub; import java.util.*; public class Holder { private int id; private String name; private double suspicionScore; private Set followers; public Holder(int id, String name) { this.id = id; this.name = name; followers = new HashSet<>(); } public int getId() { return id; } public void setSuspicionScore(double sus){ this.suspicionScore = sus; } public double getSuspicionScore(){return suspicionScore;} public String getName() { return name; } public Set getFollowers() { return followers; } public void addFollower(Holder follower){ followers.add(follower); } @Override public String toString() { return name; } public String toTestString() { return "Holder{" + "id=" + id + ", name='" + name + '\'' + ", suspicionScore=" + suspicionScore + ", followers=" + followers + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Holder holder = (Holder) o; return id == holder.id && Objects.equals(name, holder.name); } @Override public int hashCode() { return Objects.hash(id, name); } }