private boolean searchInternal(int state, int tagKey, int valueKey, boolean loadOutput) { values[storage.PROPS.R_TAG.getId()] = tagKey; values[storage.PROPS.R_VALUE.getId()] = valueKey; values[storage.PROPS.R_DISABLE.getId()] = 0; RenderingRule accept = storage.getRule(state, tagKey, valueKey); if (accept == null) { return false; } boolean match = visitRule(accept, loadOutput); if (match && values[storage.PROPS.R_DISABLE.getId()] != 0) { return false; } return match; }
public boolean search(int state, boolean loadOutput) { searchResult = false; int tagKey = values[storage.PROPS.R_TAG.getId()]; int valueKey = values[storage.PROPS.R_VALUE.getId()]; boolean result = searchInternal(state, tagKey, valueKey, loadOutput); if (result) { searchResult = true; return true; } result = searchInternal(state, tagKey, 0, loadOutput); if (result) { searchResult = true; return true; } result = searchInternal(state, 0, 0, loadOutput); if (result) { searchResult = true; return true; } return false; }