public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
/** * 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 ) ); }
/** * 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 Integer get( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } int 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 ); } }
/** * 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 Integer remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } int 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 ); } }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Integer put( Integer key, Integer value ) { int k; int v; if ( key == null ) { k = _map.getNoEntryKey(); } else { k = unwrapKey( key ); } if ( value == null ) { v = _map.getNoEntryValue(); } else { v = unwrapValue( value ); } int retval = _map.put( k, v ); if ( retval == _map.getNoEntryValue() ) { return null; } return wrapValue( retval ); }
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
@Override public int getNoEntryKey() { return m.getNoEntryKey(); } @Override
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
@Override public int getNoEntryKey() { return m.getNoEntryKey(); } @Override
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
/** * @param streetLayer needed because we need stopForStreetVertex * @param dominanceVariable according to which dominance variable should states be compared (same as in routing) * @param maxStops maximal number of stops that should be found * @param minTravelTimeSeconds for stops that should be still added to list of stops */ public StopVisitor(StreetLayer streetLayer, State.RoutingVariable dominanceVariable, int maxStops, int minTravelTimeSeconds) { this.minTravelTimeSeconds = minTravelTimeSeconds; this.streetLayer = streetLayer; this.dominanceVariable = dominanceVariable; this.maxStops = maxStops; this.NO_STOP_FOUND = streetLayer.parentNetwork.transitLayer.stopForStreetVertex .getNoEntryKey(); }
/** * @param streetLayer needed because we need stopForStreetVertex * @param dominanceVariable according to which dominance variable should states be compared (same as in routing) * @param maxStops maximal number of stops that should be found * @param minTravelTimeSeconds for stops that should be still added to list of stops */ public StopVisitor(StreetLayer streetLayer, State.RoutingVariable dominanceVariable, int maxStops, int minTravelTimeSeconds) { this.minTravelTimeSeconds = minTravelTimeSeconds; this.streetLayer = streetLayer; this.dominanceVariable = dominanceVariable; this.maxStops = maxStops; this.NO_STOP_FOUND = streetLayer.parentNetwork.transitLayer.stopForStreetVertex .getNoEntryKey(); }
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
public int getNoEntryKey() { return m.getNoEntryKey(); } public int getNoEntryValue() { return m.getNoEntryValue(); }
/** * 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 ) ); }
/** * 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 ) ); }