-
- public boolean EthernetMatchEquals(EthernetMatch statsEtherMatch, EthernetMatch storedEtherMatch) {
- if (statsEtherMatch == storedEtherMatch) {
- return true;
- }
- if (storedEtherMatch.getEthernetDestination()== null) {
- if (statsEtherMatch.getEthernetDestination() != null) {
- if(!statsEtherMatch.getEthernetDestination().getAddress().getValue().equals("00:00:00:00:00:00")){
- return false;
- }
- }
- } else if(!storedEtherMatch.getEthernetDestination().equals(statsEtherMatch.getEthernetDestination())) {
- return false;
- }
- if (storedEtherMatch.getEthernetSource() == null) {
- if (statsEtherMatch.getEthernetSource() != null) {
- if(!statsEtherMatch.getEthernetSource().getAddress().getValue().equals("00:00:00:00:00:00")){
- return false;
- }
- }
- } else if(!storedEtherMatch.getEthernetSource().equals(statsEtherMatch.getEthernetSource())) {
- return false;
- }
- if (storedEtherMatch.getEthernetType() == null) {
- if (statsEtherMatch.getEthernetType() != null) {
- if(!statsEtherMatch.getEthernetType().getType().getValue().equals(0)){
- return false;
- }
- }
- } else if(!storedEtherMatch.getEthernetType().equals(statsEtherMatch.getEthernetType())) {
- return false;
- }
- return true;
- }