@SuppressWarnings("rawtypes") @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; Deduction other = (Deduction) obj; if (rule == null) { if (other.rule != null) return false; } else if (!rule.equals(other.rule)) return false; if (subs == null) { if (other.subs != null) return false; } else if (!subs.equals(other.subs)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; ArgumentStructure other = (ArgumentStructure) obj; if (derivation == null) { if (other.derivation != null) return false; } else if (!derivation.equals(other.derivation)) return false; return true; }
/** * returns true if one arguments in <source>arguments</source> attacks another within this attack relation. * @param arguments a list of arguments * @return returns true if one arguments in <source>arguments</source> attacks another. */ public boolean isConflictFree(Collection<? extends Argument> arguments){ Iterator<? extends Argument> it = arguments.iterator(); while(it.hasNext()){ Argument arg = (Argument) it.next(); if(arg.equals(this.getAttacker())){ Iterator<? extends Argument> it2 = arguments.iterator(); while(it2.hasNext()){ Argument arg2 = (Argument) it2.next(); if(arg2.equals(this.getAttacked())) return false; } } } return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; GroundedGameUtilityFunction other = (GroundedGameUtilityFunction) obj; if (argument == null) { if (other.argument != null) return false; } else if (!argument.equals(other.argument)) return false; if (epsilon == null) { if (other.epsilon != null) return false; } else if (!epsilon.equals(other.epsilon)) return false; if (theory == null) { if (other.theory != null) return false; } else if (!theory.equals(other.theory)) return false; if (faction != other.faction) return false; return true; } }
/** * Checks whether "arg1" supports "arg2", i.e. whether there * is an even-length path from "arg1" to "arg2". * @param arg1 an AbstractArgument. * @param arg2 an AbstractArgument. * @param visited already visited arguments. * @return "true" iff "arg1" supports "arg2". */ private boolean isSupport(Argument arg1, Argument arg2, Set<Argument> visited){ if(arg1.equals(arg2)) return true; visited.add(arg1); Set<Argument> attackedArguments = this.getAttacked(arg1); attackedArguments.removeAll(visited); for(Argument attacked : attackedArguments){ if(this.isIndirectAttack(attacked, arg2)) return true; } return false; }