public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } public boolean containsValue( double value ){
public boolean containsKey( int key ) { return m.containsKey( key ); } public boolean containsValue( double 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( unwrapKey( key ) ); }
/** * {@inheritDoc} */ public boolean connects(int vertex) { return edges.containsKey(vertex); }
public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } public boolean containsValue( double value ){
@Override public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } @Override
public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } public boolean containsValue( double value ){
public boolean containsKey( int key ) { synchronized( mutex ) { return m.containsKey( key ); } } public boolean containsValue( double value ){
@Override public boolean containsKey( int key ) { return m.containsKey( key ); } @Override
public boolean containsKey( int key ) { return m.containsKey( key ); } public boolean containsValue( double 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( unwrapKey( key ) ); }
/** * {@inheritDoc} */ public int disconnect(int vertex) { if (edges.containsKey(vertex)) { edges.remove(vertex); return 1; } return 0; }
/** * 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( unwrapKey( key ) ); }
/** * 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 */ @Override public boolean containsKey( Object key ) { if ( key == null ) return _map.containsKey( _map.getNoEntryKey() ); return key instanceof Integer && _map.containsKey( unwrapKey( key ) ); }
/** * 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( unwrapKey( key ) ); }
/** * {@inheritDoc} */ public Set<WeightedEdge> getEdges(int vertex) { return (edges.containsKey(vertex)) ? Collections.<WeightedEdge>singleton( new SimpleWeightedEdge(rootVertex, vertex, edges.get(vertex))) : Collections.<WeightedEdge>emptySet(); }
private double getGenerality(int wpId) throws DaoException { if (generality.containsKey(wpId)) { return generality.get(wpId); } int numInLinks = lld.getCount(new DaoFilter().setLanguages(language).setDestIds(wpId)); double g = 0.5 + Math.log(1 + Math.min(MAX_INLINKS, numInLinks)) / Math.log(1 + MAX_INLINKS); generality.put(numInLinks, numInLinks); return numInLinks; }
private void handleSliderInput(int sliderIndex, int data) { double value = SliderboardTools.toSliderPercent(data); List<SliderboardListener> listeners = sliderListeners.get(sliderIndex); double previousValue = sliderValues.containsKey(sliderIndex) ? sliderValues.get(sliderIndex) : -1.0; if (listeners != null && previousValue != value) { listeners.forEach(listener -> listener.sliderMoved(value)); } sliderValues.put(sliderIndex, value); }
public synchronized double probability(final int x) { if (!cacheProbability.containsKey(x) && x >= getSupportLowerBound() && x <= getSupportUpperBound()) { cacheProbability.put(x, super.probability(x)); } return cacheProbability.get(x); } private TIntDoubleMap cacheCumulativeProbability = new TIntDoubleHashMap();
public synchronized double cumulativeProbability(final int x) { if (!cacheCumulativeProbability.containsKey(x) && x >= getSupportLowerBound() && x <= getSupportUpperBound()) { cacheCumulativeProbability.put(x, super.cumulativeProbability(x)); } return cacheCumulativeProbability.get(x); } private Double cacheNumericalMean;