public short remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Short> map ) {
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Short remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } short v = _map.remove( 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 ); } }
@Override public short remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } @Override
public short remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Short> map ) {
public short remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Short> map ) {
public short remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Short> map ) {
@Override public final ZonedDateTime setValue(int index, ZonedDateTime value) { this.checkBounds(index, length); final ZonedDateTime oldValue = getValue(index); final long valueAsLong = value == null ? nullValue : value.toInstant().toEpochMilli(); if (valueAsLong == defaultValueAsLong) { this.values.remove(index); this.zoneIds.remove(index); return oldValue; } else { final short zoneId = value == null ? NULL_ZONE : zoneIdMap1.get(value.getZone()); this.values.put(index, valueAsLong); this.zoneIds.put(index, zoneId); return oldValue; } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ @Override public Short remove( Object key ) { if (! (key instanceof Integer ) ) { return null; } int k = unwrapKey( key ); if ( _map.containsKey( k ) ) { short v = _map.remove( k ); return wrapValue( v ); } return null; }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Short remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } short v = _map.remove( 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 ); } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Short remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } short v = _map.remove( 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 ); } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Short remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } short v = _map.remove( 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 ); } }
@Override public final Array<ZonedDateTime> swap(int i, int j) { final long v1 = values.get(i); final long v2 = values.get(j); final short z1 = zoneIds.get(i); final short z2 = zoneIds.get(j); if (v1 == defaultValueAsLong) { this.values.remove(j); this.zoneIds.remove(j); } else { this.values.put(j, v1); this.zoneIds.put(j, z1); } if (v2 == defaultValueAsLong) { this.values.remove(i); this.zoneIds.remove(i); } else { this.values.put(i, v2); this.zoneIds.put(i, z2); } return this; }
@Override public final long setLong(int index, long value) { this.checkBounds(index, length); final long oldValue = getLong(index); if (value == defaultValueAsLong) { this.values.remove(index); this.zoneIds.remove(index); return oldValue; } else { final short zoneId = zoneIds.get(index); this.values.put(index, value); this.zoneIds.put(index, zoneId != NULL_ZONE ? zoneId : UTC_ZONE); return oldValue; } }