/** * Returns true if this mutation has a matching identifier * * @param id * the MutationIdentifier to match * @return true if the MutationIdentifier matches otherwise false */ public boolean matches(final MutationIdentifier id) { return this.location.equals(id.location) && this.mutator.equals(id.mutator) && this.indexes.contains(id.getFirstIndex()); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BlockLocation other = (BlockLocation) obj; if (this.block != other.block) { return false; } if (this.location == null) { if (other.location != null) { return false; } } else if (!this.location.equals(other.location)) { return false; } return true; }
public static Predicate<MethodTree> forLocation(final Location location) { return a -> a.asLocation().equals(location); } }
return false; } else if (!this.location.equals(other.location)) { return false;
public static Function<MethodTree, Predicate<MutationDetails>> matchMutationsInMethod() { return method -> { final Location methodLocation = method.asLocation(); return a -> methodLocation.equals(a.getId().getLocation()); }; } }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BlockLocation other = (BlockLocation) obj; if (this.block != other.block) { return false; } if (this.location == null) { if (other.location != null) { return false; } } else if (!this.location.equals(other.location)) { return false; } return true; }
/** * Returns true if this mutation has a matching identifier * * @param id * the MutationIdentifier to match * @return true if the MutationIdentifier matches otherwise false */ public boolean matches(final MutationIdentifier id) { return this.location.equals(id.location) && this.mutator.equals(id.mutator) && this.indexes.contains(id.getFirstIndex()); }
return false; } else if (!this.location.equals(other.location)) { return false;
public void add(MutationResult mutation) { if(!mutation.getDetails().getId().getLocation().equals(location)) throw new IllegalArgumentException("All related mutations should be placed in the same location"); mutationResults.add(mutation); updateStatus(mutation.getStatus()); }