public boolean isRegisteredRule(int id) { return decodingRules.containsKey(id); }
public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } public boolean containsValue( Object value ){
public boolean containsKey( int key ) { return m.containsKey( key ); } public boolean containsValue( Object val ) { return m.containsValue( val ); }
/** * Checks for the present of <tt>key</tt> in the keys of the map. * * @param key an <code>Object</code> value * @return a <code>boolean</code> value */ public boolean containsKey( Object key ) { if ( key == null ) return _map.containsKey( _map.getNoEntryKey() ); return key instanceof Integer && _map.containsKey( ( ( Integer ) key ).intValue() ); }
if (!decodingRules.containsKey(id)) { decodingRules.put(id, new TagValuePair(tag, val, type));
if (!raptorData.transferRules.isEmpty() && raptorData.transferRules.containsKey(stopIndex)) { for (TransferRule tr : raptorData.transferRules.get(stopIndex)) { if (tr.matches(raptorData.timetablesForPattern.get(previousPattern), this)) {
/** {@inheritDoc} */ public boolean equals( Object other ) { if ( ! ( other instanceof TIntObjectMap ) ) { return false; } TIntObjectMap that = ( TIntObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TIntObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); int key = iter.key(); Object value = iter.value(); if ( value == null ) { if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { return false; } } else { if ( !value.equals( that.get( key ) ) ) { return false; } } } } catch ( ClassCastException ex ) { // unused. } return true; }
if (!temporaryTransfers.containsKey(graphIndex)) temporaryTransfers.put(graphIndex, new TIntIntHashMap()); for (int pattern = 0; pattern < timetablesForPattern.size(); pattern++) { for (int stop : timetablesForPattern.get(pattern).stopIndices) { if (!patternsForStopList.containsKey(stop)) patternsForStopList.put(stop, new TIntArrayList()); for (int stop = 0; patternsForStopList.containsKey(stop); stop++) { patternsForStop.add(patternsForStopList.get(stop).toArray()); if (temporaryTransfers.containsKey(stop)) { for (TIntIntIterator tranIt = temporaryTransfers.get(stop).iterator(); tranIt.hasNext();) { tranIt.advance(); if (sampleIndex.containsKey(v0)) list = sampleIndex.get(v0); else { if (sampleIndex.containsKey(v1)) list = sampleIndex.get(v1); else { if (!sampleIndex.containsKey(v)) continue STREET; if (!transferRules.containsKey(index)) transferRules.put(index, new ArrayList<>());
/** * Returns true if a texture is present in the unit. * * @param unit The unit to check * @return Whether or not a texture is present */ public boolean hasTexture(int unit) { return textures != null && textures.containsKey(unit); }
/** * Returns true in an attribute can be found at the provided index. * * @param index The index to lookup * @return Whether or not an attribute is at the index */ public boolean hasAttribute(int index) { return attributes.containsKey(index); }
/** * {@inheritDoc} */ public boolean connects(int vertex) { return edges.containsKey(vertex); }
/** * {@inheritDoc} */ public boolean contains(int vertex) { return vertexToEdges.containsKey(vertex); }
/** * Checks for the present of <tt>key</tt> in the keys of the map. * * @param key an <code>Object</code> value * @return a <code>boolean</code> value */ public boolean containsKey( Object key ) { if ( key == null ) return _map.containsKey( _map.getNoEntryKey() ); return key instanceof Integer && _map.containsKey( ( ( Integer ) key ).intValue() ); }
public void removeListener(ButtonListener buttonListener, int buttonIndex) { if (buttonListeners.containsKey(buttonIndex)) { buttonListeners.get(buttonIndex).remove(buttonListener); } }
/** * Returns a dense binary array containing 1's where the input bits are part * of this pool. * @param c the {@link Connections} * @return dense binary array of member inputs */ public int[] getDensePotential(Connections c) { return IntStream.range(0, c.getNumInputs()) .map(i -> synapsesBySourceIndex.containsKey(i) ? 1 : 0) .toArray(); }
public int[] rec(int vecid) { if (this.sorters.containsKey(vecid)) { return this.sorters.get(vecid).vecids(); } else return new int[0]; }
@Override public void onVectorSetted(VectorSet evtSrc, int vecid, int[] old, int[] vector) { if (evtSrc == this.source && sorters.containsKey(vecid)) { sorters.get(vecid).reset(); } processSparseChangedEvt(evtSrc, vecid, vector); }
@Override public void onVectorAccumulated(VectorSet evtSrc, int vecid, int[] vector, int[] accumulated) { if (evtSrc == this.source && sorters.containsKey(vecid)) { sorters.get(vecid).reset(); } processSparseChangedEvt(evtSrc, vecid, accumulated); }
public void addReverseIndex(int srcVecId, int tgtVecId) { if (!this.reverseIndexer.containsKey(tgtVecId)) { this.reverseIndexer.put(tgtVecId, new TIntHashSet()); } reverseIndexer.get(tgtVecId).add(srcVecId); }
public void remove(int srcVecId, int tgtVecId) { this.sorters.get(srcVecId).remove(tgtVecId); if (reverseIndexer.containsKey(tgtVecId)) { reverseIndexer.get(tgtVecId).remove(srcVecId); } }