public double get( short key ) { synchronized( mutex ) { return m.get( key ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { short k; if ( key != null ) { if ( key instanceof Short ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.get( k ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TShortDoubleMap ) ) { return false; } TShortDoubleMap that = ( TShortDoubleMap ) other; if ( that.size() != this.size() ) { return false; } double[] values = _values; byte[] states = _states; double this_no_entry_value = getNoEntryValue(); double that_no_entry_value = that.getNoEntryValue(); for ( int i = values.length; i-- > 0; ) { if ( states[i] == FULL ) { short key = _set[i]; double that_value = that.get( key ); double this_value = values[i]; if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { short k; if ( key != null ) { if ( key instanceof Short ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.get( k ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ @Override public Double get( Object key ) { if (! ( key instanceof Short ) ) { return null; } short k = unwrapKey( key ); double v = _map.get( k ); if (v == _map.getNoEntryValue() && !_map.containsKey( k ) ) { return null; } return wrapValue( v ); }
public double get( short key) { return m.get( key ); }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { short k; if ( key != null ) { if ( key instanceof Short ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.get( k ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TShortDoubleMap ) ) { return false; } TShortDoubleMap that = ( TShortDoubleMap ) other; if ( that.size() != this.size() ) { return false; } double[] values = _values; byte[] states = _states; double this_no_entry_value = getNoEntryValue(); double that_no_entry_value = that.getNoEntryValue(); for ( int i = values.length; i-- > 0; ) { if ( states[i] == FULL ) { short key = _set[i]; double that_value = that.get( key ); double this_value = values[i]; if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
@Override public double get( short key ) { synchronized( mutex ) { return m.get( key ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { short k; if ( key != null ) { if ( key instanceof Short ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.get( k ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TShortDoubleMap ) ) { return false; } TShortDoubleMap that = ( TShortDoubleMap ) other; if ( that.size() != this.size() ) { return false; } double[] values = _values; byte[] states = _states; double this_no_entry_value = getNoEntryValue(); double that_no_entry_value = that.getNoEntryValue(); for ( int i = values.length; i-- > 0; ) { if ( states[i] == FULL ) { short key = _set[i]; double that_value = that.get( key ); double this_value = values[i]; if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
public double get( short key ) { synchronized( mutex ) { return m.get( key ); } }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TShortDoubleMap ) ) { return false; } TShortDoubleMap that = ( TShortDoubleMap ) other; if ( that.size() != this.size() ) { return false; } double[] values = _values; byte[] states = _states; double this_no_entry_value = getNoEntryValue(); double that_no_entry_value = that.getNoEntryValue(); for ( int i = values.length; i-- > 0; ) { if ( states[i] == FULL ) { short key = _set[i]; double that_value = that.get( key ); double this_value = values[i]; if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
public double get( short key ) { synchronized( mutex ) { return m.get( key ); } }
/** {@inheritDoc} */ @Override public boolean equals( Object other ) { if ( ! ( other instanceof TShortDoubleMap ) ) { return false; } TShortDoubleMap that = ( TShortDoubleMap ) other; if ( that.size() != this.size() ) { return false; } TDoubleOffheapArray values = _values; TByteOffheapArray states = _states; double this_no_entry_value = getNoEntryValue(); double that_no_entry_value = that.getNoEntryValue(); for ( int i = capacity(); i-- > 0; ) { if ( states.get( i ) == FULL ) { short key = _set.get( i ); double that_value = that.get( key ); double this_value = values.get( i ); if ( ( this_value != that_value ) && ( this_value != this_no_entry_value ) && ( that_value != that_no_entry_value ) ) { return false; } } } return true; }
public double get( short key) { return m.get( key ); }
public double get( short key ) { synchronized( mutex ) { return m.get( key ); } }
public double get( short key) { return m.get( key ); }
@Override public double get( short key) { return m.get( key ); }
public double get( short key) { return m.get( key ); }