org.sdnplatform.sync.internal.version
Class ChainedResolver<T>

java.lang.Object
  extended by org.sdnplatform.sync.internal.version.ChainedResolver<T>
All Implemented Interfaces:
IInconsistencyResolver<T>

public class ChainedResolver<T>
extends java.lang.Object
implements IInconsistencyResolver<T>

Apply the given inconsistency resolvers in order until there are 1 or fewer items left.


Constructor Summary
ChainedResolver(IInconsistencyResolver<T>... resolvers)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.util.List<T> resolveConflicts(java.util.List<T> items)
          Take two different versions of an object and combine them into a single version of the object Implementations must maintain the contract that resolveConflict([null, null]) == null if t != null, then resolveConflict([null, t]) == resolveConflict([t, null]) == t
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedResolver

public ChainedResolver(IInconsistencyResolver<T>... resolvers)
Method Detail

resolveConflicts

public java.util.List<T> resolveConflicts(java.util.List<T> items)
Description copied from interface: IInconsistencyResolver
Take two different versions of an object and combine them into a single version of the object Implementations must maintain the contract that
  1. resolveConflict([null, null]) == null
  2. if t != null, then resolveConflict([null, t]) == resolveConflict([t, null]) == t
  3. Specified by:
    resolveConflicts in interface IInconsistencyResolver<T>
    Parameters:
    items - The items to be resolved
    Returns:
    The united object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object