1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Reformat.

This commit is contained in:
Cedric Beust 2017-03-18 23:18:01 -07:00
parent 3bdc83b20e
commit 43b037171c

View file

@ -1,7 +1,6 @@
package com.beust.kobalt.internal
import com.beust.kobalt.api.IProjectAffinity
import com.beust.kobalt.api.ISimpleAffinity
import com.beust.kobalt.api.KobaltContext
import com.beust.kobalt.api.Project
@ -19,11 +18,5 @@ class ActorUtils {
fun <T : IProjectAffinity> selectAffinityActors(project: Project, context: KobaltContext, actors: List<T>)
= actors.filter { it.affinity(project, context) > 0 }
.sortedByDescending { it.affinity(project, context) }
/**
* Return the plug-in actor with the highest affinity.
*/
fun <T : ISimpleAffinity<A>, A> selectAffinityActor(actors: List<T>, arg: A) = actors.maxBy { it.affinity(arg) }
}
}