public boolean isPullActive() {
   if (states != null) {
     for (KnapsackState ks : states) {
       if (ks != null && "pull".equals(ks.getMode())) {
         return true;
       }
     }
   }
   return false;
 }
 public boolean isImportActive(Path path) {
   if (states != null && path != null) {
     for (KnapsackState ks : states) {
       if (ks != null
           && "import".equals(ks.getMode())
           && ks.getPath() != null
           && path.toString().equals(ks.getPath().toString())) {
         return true;
       }
     }
   }
   return false;
 }