Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2016 the original author or authors.
*/
package com.fitbur.assertj.internal;
/*
* Created on Sep 17, 2010
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright @2010-2011 the original author or authors.
*/
import static java.lang.String.format;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
import com.fitbur.assertj.util.Objects;
/**
* Implements {@link ComparisonStrategy} contract with a comparison strategy based on
* {@link Objects#areEqual(Object, Object)} method, it is also based on {@link Comparable#compareTo(Object)} when Object
* are {@link Comparable} method.
*
* @author Joel Costigliola
*/
public class StandardComparisonStrategy extends AbstractComparisonStrategy {
private static final StandardComparisonStrategy INSTANCE = new StandardComparisonStrategy();
/**
* Returns the singleton instance of this class.
*
* @return the singleton instance of this class.
*/
public static StandardComparisonStrategy instance() {
return INSTANCE;
}
/**
* Creates a new {@link StandardComparisonStrategy}, comparison strategy being based on
* {@link Objects#areEqual(Object, Object)}.
*/
protected StandardComparisonStrategy() {
// empty
}
@Override
protected Set