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