org.brijframework.resources.group.FileResourceGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of github-brijframework-resources Show documentation
Show all versions of github-brijframework-resources Show documentation
This is the resources library of brijframework
The newest version!
package org.brijframework.resources.group;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import org.brijframework.group.impl.DefaultGroup;
import org.brijframework.resources.Resource;
public class FileResourceGroup implements DefaultGroup {
/**
*
*/
private static final long serialVersionUID = 1L;
private Object id;
private ConcurrentHashMap cache = new ConcurrentHashMap<>();
public FileResourceGroup(String id) {
this.setGroupKey(id);
}
public void setGroupKey(Object id) {
this.id=id;
}
public void init() {
}
@Override
public ConcurrentHashMap getCache() {
return cache;
}
public void destory() {
}
protected ClassLoader getClassLoader() {
return this.getClass().getClassLoader();
}
@Override
public Object getGroupKey() {
return id;
}
@Override
public String toString() {
AtomicInteger count=new AtomicInteger(0);
StringBuilder builder=new StringBuilder();
builder.append(this.getClass().getSimpleName()+"(");
getCache().forEach((key,value)->{
builder.append(key+" = "+value.toString());
if(count.getAndIncrement() T find(String parentID, Class> type) {
// TODO Auto-generated method stub
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy