* {@inheritDoc}
*/
@Override
public SimplePath[] findPaths(KamNode[] sources, KamNode[] targets) {
if (noItems(sources)) {
throw new InvalidArgument("sources", sources);
}
if (noItems(targets)) {
throw new InvalidArgument("targets", targets);
}
if (nulls((Object[]) sources)) {
throw new InvalidArgument("Source nodes contains null elements");
}
if (nulls((Object[]) targets)) {
throw new InvalidArgument("Target nodes contains null elements");
}
KamNode[] nodes = concat(sources, targets);
Kam[] kams = kams(nodes);
if (!sameKAMs(kams)) {
throw new InvalidArgument("Source/target KAMs are not equal");
}
return findPaths(kams[0], sources, targets);
}