org.omnaest.utils.pattern
Class MatchResultGroupReplacer

java.lang.Object
  extended by org.omnaest.utils.pattern.MatchResultGroupReplacer

public class MatchResultGroupReplacer
extends Object

Class which allows to replace the group values of a string found by a previous Matcher.matches() call.

Author:
Omnaest

Field Summary
protected  MatchResult matchResult
           
 
Constructor Summary
MatchResultGroupReplacer(MatchResult matchResult)
           
 
Method Summary
 String replaceGroups(Map<Integer,String> groupIndexToNewValueMap)
          Replaces the Matcher.group(int) for all group index positions of the given map by the corresponding new values given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matchResult

protected MatchResult matchResult
Constructor Detail

MatchResultGroupReplacer

public MatchResultGroupReplacer(MatchResult matchResult)
Method Detail

replaceGroups

public String replaceGroups(Map<Integer,String> groupIndexToNewValueMap)
Replaces the Matcher.group(int) for all group index positions of the given map by the corresponding new values given.

Parameters:
groupIndexToNewValueMap -


Copyright © 2013. All Rights Reserved.