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