package bluej.collect;
import java.io.File;
import bluej.collect.CollectUtility.ProjectDetails;
class FileKey
{
private File projDir;
private String file;
public FileKey(ProjectDetails proj, String path)
{
this.projDir = proj.projectDir;
this.file = path;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((file == null) ? 0 : file.hashCode());
result = prime * result
+ ((projDir == null) ? 0 : projDir.hashCode());
return result;
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FileKey other = (FileKey) obj;
if (file == null) {
if (other.file != null)
return false;
}
else if (!file.equals(other.file))
return false;
if (projDir == null) {
if (other.projDir != null)
return false;
}
else if (!projDir.equals(other.projDir))
return false;
return true;
}
}
. - FileKey
. FileKey
. hashCode
. equals
75 neLoCode
+ 0 LoComm