public List<P2S1B1> lookup(String binaryKey, final short[] states) {
		List<P2S1B1> res = new ArrayList<P2S1B1>();
		List<P2S1B1> caches = cacheDir.get(binaryKey);
		P2S1B1 csp;
		boolean b;
		if (caches != null) {
			for (int i = 0; i < caches.size(); i++) {
				csp = caches.get(i);
				b = false;
				for (int j = 0; states != null && j < states.length && !b; j++) {
					if (states[i] == csp.s) {
						b = true;
					}
				}
				if (b || states == null) {
					res.add(csp);
				}
			}
		}
		return res;

	}