Java Code Examples for java.util.HashMap.equals()

The following are Jave code examples for showing how to use equals() of the java.util.HashMap class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: ats-framework   File: ComponentHotDeployTask.java   View Source Code Vote up 6 votes
private boolean needReload() {

        if (!componentLocation.exists() || !componentLocation.isDirectory()) {
            log.error("Component location '" + componentLocation.getAbsolutePath()
                      + "' does not exist or is not a directory - skipping it");
            return false;
        }

        boolean result = false;

        File[] jarFiles = componentLocation.listFiles(new JarFilenameFilter());
        if (jarFiles != null) {
            HashMap<String, Long> currentModificationTimes = getLastModificationTimes(jarFiles);
            if (!currentModificationTimes.equals(lastModificationTimes)) {

                lastModificationTimes = currentModificationTimes;
                result = true;
            }
        }

        return result;
    }
 
Example 2
Project: Dispatch   File: Crisis.java   View Source Code Vote up 5 votes
public void setFirstResponders(HashMap<String, String> firstResponders) {
    if(firstResponders.equals(null)){
        this.firstResponders =  new HashMap<>();
    } else {
        this.firstResponders = firstResponders;
    }
}