Example usage for org.apache.commons.collections4 Trie putAll

List of usage examples for org.apache.commons.collections4 Trie putAll

Introduction

In this page you can find the example usage for org.apache.commons.collections4 Trie putAll.

Prototype

void putAll(Map<? extends K, ? extends V> m);

Source Link

Document

Copies all of the mappings from the specified map to this map (optional operation).

Usage

From source file:cherry.goods.telno.TelNoNormalizerImplTest.java

private TelNoNormalizer create() {
    try {//from  w  w  w. ja  va 2  s  .c  o m
        Trie<String, Integer> trie = new PatriciaTrie<>();
        trie.putAll(parse("soumu/000124070.xls"));
        trie.putAll(parse("soumu/000124071.xls"));
        trie.putAll(parse("soumu/000124072.xls"));
        trie.putAll(parse("soumu/000124073.xls"));
        trie.putAll(parse("soumu/000124074.xls"));
        trie.putAll(parse("soumu/000124075.xls"));
        trie.putAll(parse("soumu/000124076.xls"));
        trie.putAll(parse("soumu/000124077.xls"));
        TelNoNormalizerImpl impl = new TelNoNormalizerImpl();
        impl.setAreaCodeTable(trie);
        return impl;
    } catch (InvalidFormatException | IOException ex) {
        throw new IllegalStateException(ex);
    }
}