Removing inlines annotation from properties
This commit is contained in:
@@ -49,7 +49,7 @@ public fun String?.orEmpty(): String = this ?: ""
|
|||||||
|
|
||||||
// "Extension functions" for CharSequence
|
// "Extension functions" for CharSequence
|
||||||
|
|
||||||
inline val CharSequence.size : Int
|
val CharSequence.size : Int
|
||||||
get() = this.length
|
get() = this.length
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -166,10 +166,10 @@ public fun String.toRegex(flags: Int=0): java.util.regex.Pattern {
|
|||||||
return java.util.regex.Pattern.compile(this, flags)
|
return java.util.regex.Pattern.compile(this, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline val String.reader : StringReader
|
val String.reader : StringReader
|
||||||
get() = StringReader(this)
|
get() = StringReader(this)
|
||||||
|
|
||||||
inline val String.size : Int
|
val String.size : Int
|
||||||
get() = length()
|
get() = length()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,25 +5,25 @@ import java.util.concurrent.ExecutorService
|
|||||||
import java.util.concurrent.Future
|
import java.util.concurrent.Future
|
||||||
import java.util.concurrent.Callable
|
import java.util.concurrent.Callable
|
||||||
|
|
||||||
inline val currentThread : Thread
|
val currentThread : Thread
|
||||||
get() = Thread.currentThread()
|
get() = Thread.currentThread()
|
||||||
|
|
||||||
inline var Thread.name : String
|
var Thread.name : String
|
||||||
get() = getName()
|
get() = getName()
|
||||||
set(name: String) { setName(name) }
|
set(name: String) { setName(name) }
|
||||||
|
|
||||||
inline var Thread.daemon : Boolean
|
var Thread.daemon : Boolean
|
||||||
get() = isDaemon()
|
get() = isDaemon()
|
||||||
set(on: Boolean) { setDaemon(on) }
|
set(on: Boolean) { setDaemon(on) }
|
||||||
|
|
||||||
inline val Thread.alive : Boolean
|
val Thread.alive : Boolean
|
||||||
get() = isAlive()
|
get() = isAlive()
|
||||||
|
|
||||||
inline var Thread.priority : Int
|
var Thread.priority : Int
|
||||||
get() = getPriority()
|
get() = getPriority()
|
||||||
set(prio: Int) { setPriority(prio) }
|
set(prio: Int) { setPriority(prio) }
|
||||||
|
|
||||||
inline var Thread.contextClassLoader : ClassLoader?
|
var Thread.contextClassLoader : ClassLoader?
|
||||||
get() = getContextClassLoader()
|
get() = getContextClassLoader()
|
||||||
set(loader: ClassLoader?) { setContextClassLoader(loader) }
|
set(loader: ClassLoader?) { setContextClassLoader(loader) }
|
||||||
|
|
||||||
|
|||||||
@@ -23,31 +23,31 @@ public fun File.recurse(block: (File) -> Unit): Unit {
|
|||||||
/**
|
/**
|
||||||
* Returns this if the file is a directory or the parent if its a file inside a directory
|
* Returns this if the file is a directory or the parent if its a file inside a directory
|
||||||
*/
|
*/
|
||||||
inline val File.directory: File
|
val File.directory: File
|
||||||
get() = if (this.isDirectory()) this else this.getParentFile()!!
|
get() = if (this.isDirectory()) this else this.getParentFile()!!
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the canonical path of the file
|
* Returns the canonical path of the file
|
||||||
*/
|
*/
|
||||||
inline val File.canonicalPath: String
|
val File.canonicalPath: String
|
||||||
get() = getCanonicalPath()
|
get() = getCanonicalPath()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the file name or "" for an empty name
|
* Returns the file name or "" for an empty name
|
||||||
*/
|
*/
|
||||||
inline val File.name: String
|
val File.name: String
|
||||||
get() = getName()
|
get() = getName()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the file path or "" for an empty name
|
* Returns the file path or "" for an empty name
|
||||||
*/
|
*/
|
||||||
inline val File.path: String
|
val File.path: String
|
||||||
get() = getPath()
|
get() = getPath()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the file ends with the given extension
|
* Returns true if the file ends with the given extension
|
||||||
*/
|
*/
|
||||||
inline val File.extension: String
|
val File.extension: String
|
||||||
get() {
|
get() {
|
||||||
val text = this.name
|
val text = this.name
|
||||||
val idx = text.lastIndexOf('.')
|
val idx = text.lastIndexOf('.')
|
||||||
|
|||||||
Reference in New Issue
Block a user