public class Key<T>
A key that identifies a named, typed property and can convert a string representation into a value of the type.
Define keys as constants which can be used to look up properties. For example:
val RETRY_COUNT = Key("connection.retrycount", intType)...val retryCount = config\[RETRY_COUNT\]| Constructor and Description |
|---|
Key(java.lang.String name,
kotlin.jvm.functions.Function2<? super com.natpryce.konfig.PropertyLocation,? super java.lang.String,? extends T> parse)
A key that identifies a named, typed property and can convert a string representation into a value of the type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
component1() |
kotlin.jvm.functions.Function2<com.natpryce.konfig.PropertyLocation,java.lang.String,T> |
component2() |
Key<T> |
copy(java.lang.String name,
kotlin.jvm.functions.Function2<? super com.natpryce.konfig.PropertyLocation,? super java.lang.String,? extends T> parse)
A key that identifies a named, typed property and can convert a string representation into a value of the type.
|
boolean |
equals(java.lang.Object p) |
java.lang.String |
getName() |
T |
getOrNullBy(kotlin.jvm.functions.Function1<? super java.lang.String,kotlin.Pair> lookup) |
kotlin.jvm.functions.Function2<com.natpryce.konfig.PropertyLocation,java.lang.String,T> |
getParse() |
int |
hashCode() |
java.lang.String |
toString() |
public Key(java.lang.String name,
kotlin.jvm.functions.Function2<? super com.natpryce.konfig.PropertyLocation,? super java.lang.String,? extends T> parse)
A key that identifies a named, typed property and can convert a string representation into a value of the type.
Define keys as constants which can be used to look up properties. For example:
val RETRY_COUNT = Key("connection.retrycount", intType)...val retryCount = config\[RETRY_COUNT\]public T getOrNullBy(kotlin.jvm.functions.Function1<? super java.lang.String,kotlin.Pair> lookup)
public java.lang.String getName()
public kotlin.jvm.functions.Function2<com.natpryce.konfig.PropertyLocation,java.lang.String,T> getParse()
public java.lang.String component1()
public kotlin.jvm.functions.Function2<com.natpryce.konfig.PropertyLocation,java.lang.String,T> component2()
public Key<T> copy(java.lang.String name, kotlin.jvm.functions.Function2<? super com.natpryce.konfig.PropertyLocation,? super java.lang.String,? extends T> parse)
A key that identifies a named, typed property and can convert a string representation into a value of the type.
Define keys as constants which can be used to look up properties. For example:
val RETRY_COUNT = Key("connection.retrycount", intType)...val retryCount = config\[RETRY_COUNT\]public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)