package router.client.location;

public class TestRegExp
  extends RegExp
{
  private String[] _results;

  public TestRegExp()
  {
    super( new Object() );
  }

  public void setResults( final String[] results )
  {
    _results = results;
  }

  @Override
  public String[] exec( final Object str )
  {
    return _results;
  }
}

package router.client.location;

import javax.annotation.Nonnull;

public class TestRegExp
  extends RegExp
{
  private String[] _resultGroups;

  public TestRegExp( @Nonnull final String[] resultGroups )
  {
    this();
    setResultGroups( resultGroups );
  }

  public TestRegExp()
  {
    super( new Object() );
  }

  public void setResultGroups( final String[] resultGroups )
  {
    _resultGroups = resultGroups;
  }

  @Override
  public String[] exec( final Object str )
  {
    return _resultGroups;
  }
}

Rename the match results so the intent is clearer
Rename the match results so the intent is clearer
