Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Refactor internal MatchRulePair class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos A. Munoz committed Sep 4, 2013
1 parent d1dae05 commit 3512081
Showing 1 changed file with 6 additions and 29 deletions.
Expand Up @@ -522,37 +522,14 @@ else if( currentlyStored.getState() == New )
}

/**
* Internal pair implementation.
* TODO: Apache commons collections has a Pair class which could be used here
*/
@Getter
@AllArgsConstructor
private static class Pair<T1, T2>
{
final private T1 left;
final private T2 right;
}

/**
* Internal concrete pair implementation.
* Holds the result of a rule evaluation in the form of a boolean, and the corresponding action
* Holds the result of a match evaluation in the form of a boolean, and the corresponding action
* to be taken for the result.
*/
static final class MatchRulePair extends Pair<Boolean, HCopyTransOptions.ConditionRuleAction>
@AllArgsConstructor
@Getter
static final class MatchRulePair
{
public MatchRulePair(Boolean result, HCopyTransOptions.ConditionRuleAction action)
{
super(result, action);
}

public boolean getMatchResult()
{
return super.getLeft();
}

public HCopyTransOptions.ConditionRuleAction getRuleAction()
{
return super.getRight();
}
private final Boolean matchResult;
private final HCopyTransOptions.ConditionRuleAction ruleAction;
}
}

0 comments on commit 3512081

Please sign in to comment.