BaseMemberFinder

abstract class BaseMemberFinder<T : Member, Self>(memberSequence: Sequence<T>) : BaseFinder<T, Self>

Inheritors

Constructors

Link copied to clipboard
constructor(memberSequence: Sequence<T>)

Properties

Link copied to clipboard
abstract val name: String

Functions

Link copied to clipboard
fun contact(other: BaseFinder<T, Self>): Self

Concatenate with another finder.

fun contact(other: Array<T>): Self

Concatenate with another array.

fun contact(other: Iterable<T>): Self

Concatenate with another iterable.

fun contact(other: Sequence<T>): Self

Concatenate with another sequence.

Link copied to clipboard
fun filter(filter: T.() -> Boolean): Self

Filter with a predicate.

Link copied to clipboard
fun filterByModifiers(predicate: (modifiers: Int) -> Boolean): Self

Use condition to filter by the modifiers.

fun filterByModifiers(modifiers: Int): Self

Filter by the same modifiers.

Link copied to clipboard

Filter exclude the modifiers.

Link copied to clipboard

Filter include the modifiers.

Link copied to clipboard

Filter if they are non-package-private.

Link copied to clipboard

Filter if they are non-private.

Link copied to clipboard

Filter if they are non-protected.

Link copied to clipboard

Filter if they are non-public.

Link copied to clipboard

Filter if they are package-private.

Link copied to clipboard

Filter if they are private.

Link copied to clipboard

Filter if they are protected.

Link copied to clipboard

Filter if they are public.

Link copied to clipboard
override fun first(): T

Get the first element or throw an exception if there is no such element.

override fun first(condition: T.() -> Boolean): T

Get the first element by condition or throw an exception if there is no such element.

Link copied to clipboard
override fun firstOrNull(): T?

Get the first element or null if not found.

override fun firstOrNull(condition: T.() -> Boolean): T?

Get the first element by condition or null if not found

Link copied to clipboard
fun forEach(action: (T) -> Unit)

For-each loop for.

Link copied to clipboard
fun forEachIndexed(action: (index: Int, T) -> Unit)

For-each loop with index for.

Link copied to clipboard
override fun last(): T

Get the last element or throw an exception if there is no such element.

override fun last(condition: T.() -> Boolean): T

Get the last element by condition or throw an exception if there is no such element.

Link copied to clipboard
override fun lastOrNull(): T?

Get the last element or null if not found.

override fun lastOrNull(condition: T.() -> Boolean): T?

Get the last element by condition or null if not found

Link copied to clipboard
fun <R, C : MutableCollection<in R>> mapToCollection(destination: C, transform: (T) -> R): C

Map to the collection.

Link copied to clipboard
fun <R> mapToHashSet(transform: (T) -> R): HashSet<R>

Map to the hashset.

Link copied to clipboard
fun <R> mapToList(transform: (T) -> R): List<R>

Map to the list.

Link copied to clipboard
fun <R> mapToMutableList(transform: (T) -> R): List<R>

Map to the mutable list.

Link copied to clipboard
fun <R> mapToMutableSet(transform: (T) -> R): MutableSet<R>

Map to the mutable set.

Link copied to clipboard
fun <R> mapToSet(transform: (T) -> R): Set<R>

Map to the set.

Link copied to clipboard
fun onEach(action: (T) -> Unit): Self

On-each loop for.

Link copied to clipboard
fun onEachIndexed(action: (index: Int, T) -> Unit): Self

On-each loop with index for.

Link copied to clipboard
operator fun plus(other: BaseFinder<T, Self>): Self
operator fun plus(other: Array<T>): Self
operator fun plus(other: Iterable<T>): Self
operator fun plus(other: Sequence<T>): Self
Link copied to clipboard
operator fun plusAssign(other: BaseFinder<T, Self>)
operator fun plusAssign(other: Array<T>)
operator fun plusAssign(other: Iterable<T>)
operator fun plusAssign(other: Sequence<T>)
Link copied to clipboard
fun requireCount(count: Int): Self
fun requireCount(condition: T.() -> Boolean, count: Int): Self
fun requireCount(condition: T.() -> Boolean, range: IntRange): Self
Link copied to clipboard
fun requireCountOrNull(condition: T.() -> Boolean, count: Int): Self?
fun requireCountOrNull(condition: T.() -> Boolean, range: IntRange): Self?
Link copied to clipboard

Check sequence only has one element.

fun requireSingle(condition: T.() -> Boolean): Self
Link copied to clipboard

Check sequence only has one element or null if not found.

fun requireSingleOrNull(condition: T.() -> Boolean): Self?
Link copied to clipboard
override fun single(): T

Get the single element or throw an exception if there is no such element or more than one element.

override fun single(condition: T.() -> Boolean): T
Link copied to clipboard
override fun singleOrNull(): T?

Get the single element or null if not found.

override fun singleOrNull(condition: T.() -> Boolean): T?
Link copied to clipboard
fun <C : MutableCollection<T>> toCollection(collection: C): C

Make sequence to the collection.

Link copied to clipboard

Make sequence to the hashset.

Link copied to clipboard
fun toList(): List<T>

Make sequence to the list.

Link copied to clipboard

Make sequence to the mutable list.

Link copied to clipboard

Make sequence to the mutable set.

Link copied to clipboard
fun toSet(): Set<T>

Make sequence to the set.