pl.allegro.mobile.logic.ListOfClientElements.kt Maven / Gradle / Ivy
package pl.allegro.mobile.logic
class ListOfClientElements(val values: List) : ClientLogicElement, ClientLogicArray {
class Builder {
private val elements = mutableListOf()
fun add(element: ClientLogicElement) = apply { elements.add(element) }
fun add(element: String) = apply { elements.add(StringElement(element)) }
fun add(element: Number) = apply { elements.add(NumberElement(element)) }
fun add(element: Boolean) = apply { elements.add(BooleanElement(element)) }
fun build() = ListOfClientElements(elements)
}
}