@Override public void clear() { if ( readonly ) throw new IllegalStateException("This set is readonly"); configs.clear(); cachedHashCode = -1; configLookup.clear(); }
@Override public boolean contains(Object o) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.contains(o); }
public boolean containsFast(ATNConfig obj) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.containsFast(obj); }
dipsIntoOuterContext = true; ATNConfig existing = configLookup.getOrAdd(config); if ( existing==config ) { // we added this new one cachedHashCode = -1;
dipsIntoOuterContext = true; ATNConfig existing = configLookup.getOrAdd(config); if ( existing==config ) { // we added this new one cachedHashCode = -1;
dipsIntoOuterContext = true; ATNConfig existing = configLookup.getOrAdd(config); if ( existing==config ) { // we added this new one cachedHashCode = -1;
@Override public ATNConfig[] toArray() { return configLookup.toArray(); }
@Override public <T> T[] toArray(T[] a) { return configLookup.toArray(a); }
@Override public <T> T[] toArray(T[] a) { return configLookup.toArray(a); }
@Override public <T> T[] toArray(T[] a) { return configLookup.toArray(a); }
@Override public ATNConfig[] toArray() { return configLookup.toArray(); }
@Override public void clear() { if ( readonly ) throw new IllegalStateException("This set is readonly"); configs.clear(); cachedHashCode = -1; configLookup.clear(); }
@Override public void clear() { if ( readonly ) throw new IllegalStateException("This set is readonly"); configs.clear(); cachedHashCode = -1; configLookup.clear(); }
@Override public boolean contains(Object o) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.contains(o); }
public void optimizeConfigs(ATNSimulator interpreter) { if ( readonly ) throw new IllegalStateException("This set is readonly"); if ( configLookup.isEmpty() ) return; for (ATNConfig config : configs) { // int before = PredictionContext.getAllContextNodes(config.context).size(); config.context = interpreter.getCachedContext(config.context); // int after = PredictionContext.getAllContextNodes(config.context).size(); // System.out.println("configs "+before+"->"+after); } }
public boolean containsFast(ATNConfig obj) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.containsFast(obj); }
public boolean containsFast(ATNConfig obj) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.containsFast(obj); }
@Override public boolean contains(Object o) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.contains(o); }
@Override public ATNConfig[] toArray() { return configLookup.toArray(); }
public boolean containsFast(ATNConfig obj) { if (configLookup == null) { throw new UnsupportedOperationException("This method is not implemented for readonly sets."); } return configLookup.containsFast(obj); }