Skip to content

Instantly share code, notes, and snippets.

@roberto-filho
Last active December 16, 2015 12:49
Show Gist options
  • Save roberto-filho/5437317 to your computer and use it in GitHub Desktop.
Save roberto-filho/5437317 to your computer and use it in GitHub Desktop.
Enum implementando lógica AND e OR
public enum Logic {
AND {
@Override
public boolean compare(String[] campos, Object objectToCompare, String valueToCompare) {
// Implementar lógica "AND"
return false;
}
},
OR {
@Override
public boolean compare(String[] campos, Object objectToCompare, String valueToCompare) {
// Implementar lógica "OR"
return false;
}
};
public abstract boolean compare(String[] campos, Object objectToCompare, String valueToCompare);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment