001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.gui.progress; 003 004import java.util.Objects; 005 006public class ProgressTaskId { 007 008 private final String id; 009 010 public ProgressTaskId(String component, String task) { 011 this.id = component + '.' + task; 012 } 013 014 public String getId() { 015 return id; 016 } 017 018 @Override 019 public int hashCode() { 020 return Objects.hash(id); 021 } 022 023 @Override 024 public boolean equals(Object obj) { 025 if (this == obj) return true; 026 if (obj == null || getClass() != obj.getClass()) return false; 027 ProgressTaskId that = (ProgressTaskId) obj; 028 return Objects.equals(id, that.id); 029 } 030}