Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package jason.asSemantics;
 
 
 import java.util.List;
 import java.util.Map;
public class QueryCacheSimple {
    private QueryProfiling prof;
    
    private Map<LiteralList<Unifier>> cache = null;
    protected Logger logger = null;
    
    public QueryCacheSimple(Agent agQueryProfiling p) {
        this. = p;
            = Logger.getLogger(QueryCacheSimple.class.getName()+"-"+ag.getTS().getUserAgArch().getAgName());
             = new HashMap<Literal,List<Unifier>>();
    }
    
    public void reset() {
        .clear();
    }
    
    public Iterator<UnifiergetCache(final Literal f) {
        List<Unifierl = .get(f);
        if (l == null)
            return null;
        if ( != null)
            .incHits();
        return l.iterator();
    }
    public void queryFinished(Literal fList<Unifierr) {
        //System.out.println("finished "+f+" with "+r);
        .put(fr);
    }
New to GrepCode? Check out our FAQ X