de.opitzconsulting.orcas.diff.DiffActionReasonDependsOn Maven / Gradle / Ivy
The newest version!
package de.opitzconsulting.orcas.diff;
import java.util.ArrayList;
import java.util.List;
public class DiffActionReasonDependsOn extends DiffActionReason
{
private List diffActionReasonDependsOnList = new ArrayList<>();
public List getDiffActionReasonDependsOnList()
{
return diffActionReasonDependsOnList;
}
public DiffActionReasonDependsOn( DiffReasonKey pDiffReasonKey, List pDiffActionReasonDependsOnList )
{
super( pDiffReasonKey );
diffActionReasonDependsOnList = pDiffActionReasonDependsOnList;
}
@Override
protected String getTypeString()
{
return "dependent";
}
@Override
public boolean equals( Object pOther )
{
if( !super.equals( pOther ) )
{
return false;
}
DiffActionReasonDependsOn lOther = (DiffActionReasonDependsOn) pOther;
if( diffActionReasonDependsOnList.size() != lOther.diffActionReasonDependsOnList.size() )
{
return false;
}
return !diffActionReasonDependsOnList//
.stream()//
.filter( p -> !lOther.diffActionReasonDependsOnList.contains( p ) )//
.findAny()//
.isPresent();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy