public static < V > ALongHashMap < V > fromKeysAndValues ( Iterable < ? extends Number > keys , Iterable < V > values ) { final Iterator < ? extends Number > ki = keys . iterator ( ) ; final Iterator < V > vi = values . iterator ( ) ; ALongHashMap < V > result = ALongHashMap . empty ( ) ; while ( ki . hasNext ( ) ) { final Number key = ki . next ( ) ; final V value = vi . next ( ) ; result = result . updated ( key . longValue ( ) , value ) ; } return result ; }
Returns an ALongHashMap initialized from separate keys and values collections . Both collections are iterated exactly once and are expected to have the same size .