public static < K > NumberMap < K , Float > newFloatMap ( ) { return new NumberMap < K , Float > ( ) { @ Override public void add ( K key , Float addend ) { put ( key , containsKey ( key ) ? ( get ( key ) + addend ) : addend ) ; } @ Override public void sub ( K key , Float subtrahend ) { put ( key , ( containsKey ( key ) ? get ( key ) : 0f ) - subtrahend ) ; } } ; }
Creates a NumberMap for Floats .