Java HashMap Copy copyHashWords(HashMap> ohwords, HashMap> nhwords, int start, int end, int nstart)

Here you can find the source of copyHashWords(HashMap> ohwords, HashMap> nhwords, int start, int end, int nstart)

Description

copy Hash Words

License

LGPL

Declaration

static void copyHashWords(HashMap<String, List<Integer>> ohwords, HashMap<String, List<Integer>> nhwords,
            int start, int end, int nstart) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.HashMap;
import java.util.List;

public class Main {
    static void copyHashWords(HashMap<String, List<Integer>> ohwords, HashMap<String, List<Integer>> nhwords,
            int start, int end, int nstart) {
        int ind_start = 0;
        @SuppressWarnings("unused")
        int ind_end = 1;
        @SuppressWarnings("unused")
        int ind_from = 2;
        int ind_in = 3;
        int k = nstart;

        for (int i = start; i <= end; ++k, ++i) {
            for (int j = ind_start; j <= ind_in; ++j) {
                List<Integer> val = ohwords.get(i + "-" + j);
                if (val != null) {
                    nhwords.put(k + "-" + j, val);
                }/*from w w w . j  a v a2 s.  c om*/
            }
        }
    }
}

Related

  1. copy(HashMap oldHashMap)
  2. copyDirective(HashMap directives, StringBuilder sb, String directive)
  3. copyHashMap(final HashMap map)
  4. copyItem(HashMap to, HashMap from, String key)
  5. copyMap(HashMap map)
  6. copyParam(HashMap from, HashMap to, String key)