mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Reformat.
This commit is contained in:
parent
3bdc83b20e
commit
43b037171c
1 changed files with 2 additions and 9 deletions
|
@ -1,7 +1,6 @@
|
||||||
package com.beust.kobalt.internal
|
package com.beust.kobalt.internal
|
||||||
|
|
||||||
import com.beust.kobalt.api.IProjectAffinity
|
import com.beust.kobalt.api.IProjectAffinity
|
||||||
import com.beust.kobalt.api.ISimpleAffinity
|
|
||||||
import com.beust.kobalt.api.KobaltContext
|
import com.beust.kobalt.api.KobaltContext
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
|
|
||||||
|
@ -19,11 +18,5 @@ class ActorUtils {
|
||||||
fun <T : IProjectAffinity> selectAffinityActors(project: Project, context: KobaltContext, actors: List<T>)
|
fun <T : IProjectAffinity> selectAffinityActors(project: Project, context: KobaltContext, actors: List<T>)
|
||||||
= actors.filter { it.affinity(project, context) > 0 }
|
= actors.filter { it.affinity(project, context) > 0 }
|
||||||
.sortedByDescending { it.affinity(project, context) }
|
.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) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue