org.javaswift.joss.client.website.AbstractFileObjects Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joss Show documentation
Show all versions of joss Show documentation
Java Client library for OpenStack Storage (Swift)
package org.javaswift.joss.client.website;
import java.util.Collection;
import java.util.Map;
import java.util.TreeMap;
public abstract class AbstractFileObjects implements FileObjects {
private final Map fileObjects = new TreeMap();
private final String[] ignoreFilters;
public AbstractFileObjects() {
this(new String[]{});
}
public AbstractFileObjects(final String[] ignoreFilters) {
this.ignoreFilters = ignoreFilters;
}
protected void add(String path, FileObject fileObject) {
this.fileObjects.put(path, fileObject);
}
@Override
public Collection keys() {
return this.fileObjects.keySet();
}
@Override
public FileObject get(String path) {
return this.fileObjects.get(path);
}
@Override
public boolean ignore(String path) {
for (String ignoreFilter : ignoreFilters) {
if (path.equals(ignoreFilter)) {
return true;
}
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy