@@ -0,0 +1,3116 @@
+/*%0A * Copyright 2016 PantherCode%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *        http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.panthercode.arctic.core.helper;%0A%0Aimport org.panthercode.arctic.core.arguments.ArgumentUtils;%0A%0Aimport java.util.HashMap;%0A%0A/**%0A * @author PantherCode%0A */%0Apublic class StringReplaceMap extends HashMap%3CObject, String%3E %7B%0A%0A    /**%0A     *%0A     */%0A    private String placeholderRegex = %22%22;%0A%0A    /**%0A     *%0A     */%0A    private String value = %22%22;%0A%0A    /**%0A     * @param value%0A     * @param placeholderRegex%0A     * @throws NullPointerException%0A     */%0A    public StringReplaceMap(String value,%0A                            String placeholderRegex)%0A            throws NullPointerException %7B%0A        super();%0A%0A        this.setPlaceholder(placeholderRegex);%0A        this.setValue(value);%0A    %7D%0A%0A    //Todo: constructors%0A%0A    /**%0A     * @return%0A     */%0A    public String getPlaceholer() %7B%0A        return this.placeholderRegex;%0A    %7D%0A%0A    /**%0A     * @param placeholderRegex%0A     * @throws NullPointerException%0A     */%0A    public void setPlaceholder(String placeholderRegex)%0A            throws NullPointerException %7B%0A        ArgumentUtils.assertNotNull(placeholderRegex, %22placeholder%22);%0A%0A        this.placeholderRegex = placeholderRegex;%0A    %7D%0A%0A    public String getValue() %7B%0A        return this.value;%0A    %7D%0A%0A    /**%0A     * @param valueRegex%0A     * @throws NullPointerException%0A     */%0A    public void setValue(String valueRegex)%0A            throws NullPointerException %7B%0A        ArgumentUtils.assertNotNull(this.value, %22value%22);%0A%0A        this.value = valueRegex;%0A    %7D%0A%0A    /**%0A     * @param key%0A     * @return%0A     * @throws NullPointerException%0A     */%0A    @Override%0A    public String get(Object key)%0A            throws NullPointerException %7B%0A        return this.get(key, this.value);%0A    %7D%0A%0A    /**%0A     * @param key%0A     * @param value%0A     * @return%0A     * @throws NullPointerException%0A     */%0A    public String get(Object key, String value)%0A            throws NullPointerException %7B%0A        return this.get(key, this.value, this.placeholderRegex);%0A    %7D%0A%0A    /**%0A     * @param key%0A     * @param value%0A     * @param placeholderRegex%0A     * @return%0A     * @throws NullPointerException%0A     */%0A    public String get(Object key, String value, String placeholderRegex)%0A            throws NullPointerException %7B%0A        ArgumentUtils.assertNotNull(value, %22value%22);%0A        ArgumentUtils.assertNotNull(placeholderRegex, %22placeholer%22);%0A%0A        String result = super.get(key);%0A%0A        //replaces only the first finding of version%0A        return result == null ? result : result.replaceAll(placeholderRegex, value);%0A    %7D%0A%7D%0A

implement StringReplaceMap class