Removing inlines annotation from properties

This commit is contained in:
Mikhael Bogdanov
2013-12-04 17:04:28 +04:00
parent fb34b0aa52
commit 629a07c748
4 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ public fun String?.orEmpty(): String = this ?: ""
// "Extension functions" for CharSequence
inline val CharSequence.size : Int
val CharSequence.size : Int
get() = this.length
/**
+2 -2
View File
@@ -166,10 +166,10 @@ public fun String.toRegex(flags: Int=0): java.util.regex.Pattern {
return java.util.regex.Pattern.compile(this, flags)
}
inline val String.reader : StringReader
val String.reader : StringReader
get() = StringReader(this)
inline val String.size : Int
val String.size : Int
get() = length()
@@ -5,25 +5,25 @@ import java.util.concurrent.ExecutorService
import java.util.concurrent.Future
import java.util.concurrent.Callable
inline val currentThread : Thread
val currentThread : Thread
get() = Thread.currentThread()
inline var Thread.name : String
var Thread.name : String
get() = getName()
set(name: String) { setName(name) }
inline var Thread.daemon : Boolean
var Thread.daemon : Boolean
get() = isDaemon()
set(on: Boolean) { setDaemon(on) }
inline val Thread.alive : Boolean
val Thread.alive : Boolean
get() = isAlive()
inline var Thread.priority : Int
var Thread.priority : Int
get() = getPriority()
set(prio: Int) { setPriority(prio) }
inline var Thread.contextClassLoader : ClassLoader?
var Thread.contextClassLoader : ClassLoader?
get() = getContextClassLoader()
set(loader: ClassLoader?) { setContextClassLoader(loader) }
+5 -5
View File
@@ -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
*/
inline val File.directory: File
val File.directory: File
get() = if (this.isDirectory()) this else this.getParentFile()!!
/**
* Returns the canonical path of the file
*/
inline val File.canonicalPath: String
val File.canonicalPath: String
get() = getCanonicalPath()
/**
* Returns the file name or "" for an empty name
*/
inline val File.name: String
val File.name: String
get() = getName()
/**
* Returns the file path or "" for an empty name
*/
inline val File.path: String
val File.path: String
get() = getPath()
/**
* Returns true if the file ends with the given extension
*/
inline val File.extension: String
val File.extension: String
get() {
val text = this.name
val idx = text.lastIndexOf('.')