All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javafixes.object.changing.function.replacement.ReplaceNonEqualOldValueRule Maven / Gradle / Ivy

There is a newer version: 1.4.2.0
Show newest version
package javafixes.object.changing.function.replacement;

import javafixes.object.changing.FailableValue;

import java.util.Objects;

public class ReplaceNonEqualOldValueRule implements ValueReplacementRule {

    public static ReplaceNonEqualOldValueRule INSTANCE = new ReplaceNonEqualOldValueRule<>();

    @Override
    public boolean shouldReplaceOldValue(FailableValue oldValue, FailableValue newValue) {
        return !Objects.equals(oldValue, newValue);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy