Sign in Go Pro

The Kotlin Programming Language

Creating a Kotlin Extension Function

 
Autoplay

Up next

Previous

About

In this lesson, you will learn what an extension function is and how to create one in Kotlin.

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in The Kotlin Programming Language

1. Installing the IntelliJ IDE for Kotlin Development
01:13
Donn Felker
GDE
2. Creating a Kotlin File in IntelliJ
01:18
Donn Felker
GDE
3. How to Update the Kotlin Plugin in IntelliJ
01:05
Donn Felker
GDE
4. Kotlin Hello World
01:06
Donn Felker
GDE
5. Creating Variables in Kotlin
03:17
Donn Felker
GDE
6. Creating Read Only Variables in Kotlin
02:13
Donn Felker
GDE
7. Providing the Type on Kotlin Variables
01:40
Donn Felker
GDE
8. Kotlin Data Types: Numbers
07:15
Donn Felker
GDE
9. Kotlin Data Types: String and Char
02:57
Donn Felker
GDE
10. Kotlin String Interpolation and Triple Quotes
05:15
Donn Felker
GDE
11. Kotlin Data Types: Boolean
01:52
Donn Felker
GDE
12. Kotlin Conditionals: If/Else
05:06
Donn Felker
GDE
13. Kotlin Conditionals: Single line if/else
03:52
Donn Felker
GDE
14. Kotlin Conditionals: Truth Tables
05:51
Donn Felker
GDE
15. Kotlin Structural Equality
02:11
Donn Felker
GDE
16. Kotlin Referential Equality
02:27
Donn Felker
GDE
17. Kotlin Nullable Types
01:26
Donn Felker
GDE
18. Kotlin Nullable Safe Calls
03:35
Donn Felker
GDE
19. Kotlin Elvis Operator
02:01
Donn Felker
GDE
20. How to Create a Function in Kotlin
05:41
Donn Felker
GDE
21. Returning a value from a Kotlin Function
05:20
Donn Felker
GDE
22. Kotlin Functions inside of other Functions
03:02
Donn Felker
GDE
23. Kotlin Single Line Expressions
04:08
Donn Felker
GDE
24. Kotlin Function Arguments
05:50
Donn Felker
GDE
25. Kotlin Named Parameters in Functions
04:25
Donn Felker
GDE
26. Kotlin Default Arguments
04:30
Donn Felker
GDE
27. Kotlin Refactoring to New Lines and Named Arguments in IntelliJ
01:30
Donn Felker
GDE
28. Kotlin Varargs: Providing Multiple Arguments of the Same Type
02:44
Donn Felker
GDE
29. Kotlin Function Overloading
03:33
Donn Felker
GDE
30. How to Create a Class in Kotlin
07:01
Donn Felker
GDE
31. Kotlin Class Primary Constructor
03:47
Donn Felker
GDE
32. Kotlin Class with Multiple Constructors
08:01
Donn Felker
GDE
33. Kotlin Init Block
03:39
Donn Felker
GDE
34. Kotlin Class Properties
03:03
Donn Felker
GDE
35. Kotlin Read-Only Class Properties
00:53
Donn Felker
GDE
36. Kotlin Overriding the Property Getter
01:42
Donn Felker
GDE
37. Kotlin Overriding the Property Setter
03:06
Donn Felker
GDE
38. Kotlin Multiple Properties in a Class
01:30
Donn Felker
GDE
39. Kotlin Class Functions
04:39
Donn Felker
GDE
40. Kotlin Companion Objects
05:41
Donn Felker
GDE
41. How to Create a Singleton in Kotlin
07:37
Donn Felker
GDE
42. Declaring Constants in Kotlin
06:59
Donn Felker
GDE
43. Kotlin lateinit Modifier
04:14
Donn Felker
GDE
44. Kotlin Nested Classes
03:35
Donn Felker
GDE
45. Kotlin Inner Classes
02:59
Donn Felker
GDE
46. How to Create an Enum in Kotlin
04:40
Donn Felker
GDE
47. Kotlin Enum Constructor Parameters
03:51
Donn Felker
GDE
48. Creating Abstract Functions inside of Kotlin Enums
03:24
Donn Felker
GDE
49. Iterating Over Enum Values in Kotlin
01:13
Donn Felker
GDE
50. Adding Static Methods to Kotlin Enums
01:33
Donn Felker
GDE
51. Kotlin Conditionals - The Kotlin when statement
06:41
Donn Felker
GDE
52. Kotlin when Statement - Exhaustive vs Non-exhaustive
06:51
Donn Felker
GDE
53. Kotlin Data Classes
04:18
Donn Felker
GDE
54. Kotlin Data Classes - Parameterless Constructors
01:13
Donn Felker
GDE
55. Kotlin Data Class Component1, Component2, ComponentN
03:35
Donn Felker
GDE
56. Kotin Data Class Destructuring
03:32
Donn Felker
GDE
57. Copying Kotlin Data Classes
03:30
Donn Felker
GDE
58. Kotlin Pair and Triple Data Classes
02:33
Donn Felker
GDE
59. Kotlin Protected Modifier for Variables
07:03
Donn Felker
GDE
60. Kotlin Protected Modifier for Methods
06:10
Donn Felker
GDE
61. Kotlin Internal Modifier
08:05
Donn Felker
GDE
62. How to Create an Abstract Class in Kotlin
04:38
Donn Felker
GDE
63. How to Implement an Abstract Class in Kotlin
13:45
Donn Felker
GDE
64. Kotlin Abstract Classes - Using Abstract Classes as an Abstraction
04:22
Donn Felker
GDE
65. What are Kotlin Interfaces Used For?
08:36
Donn Felker
GDE
66. Kotlin Interfaces - Creating an Interface in Kotlin
01:04
Donn Felker
GDE
67. Kotlin Interfaces - Implementing an Interface in Kotlin
01:19
Donn Felker
GDE
68. Kotlin Interfaces Example - Multiple File Systems
06:49
Donn Felker
GDE
69. Kotlin Anonymous Interfaces
04:55
Donn Felker
GDE
70. Creating Arrays in Kotlin
07:24
Donn Felker
GDE
71. Creating a List in Kotlin
05:40
Donn Felker
GDE
72. Creating Mutable Lists in Kotlin
08:01
Donn Felker
GDE
73. Filtering a List in Kotlin
05:42
Donn Felker
GDE
74. Finding Items in a Kotlin List
06:16
Donn Felker
GDE
75. Kotlin FilterNot on a List
01:26
Donn Felker
GDE
76. Creating a New Kotlin List from an Existing Kotlin List
02:30
Donn Felker
GDE
77. How to Flatten a List or an Array in Kotlin
02:59
Donn Felker
GDE
78. Combining Multiple Immutable Lists in Kotlin
01:42
Donn Felker
GDE
79. Kotlin List map Operator
08:18
Donn Felker
GDE
80. Kotlin map vs. flatMap
04:35
Donn Felker
GDE
81. Kotlin Set - A List with No Duplicates
04:50
Donn Felker
GDE
82. Kotlin For Loop
05:08
Donn Felker
GDE
83. Kotlin While Loop
03:46
Donn Felker
GDE
84. Kotlin forEach Collection Iteration
03:05
Donn Felker
GDE
85. Combine List into a Unique List with the union operator
02:50
Donn Felker
GDE
86. Kotlin Iterating over a List with an Index with forEachIndex
01:35
Donn Felker
GDE
87. Kotlin Ranges
01:31
Donn Felker
GDE
88. How To Create a Map in Kotlin
03:50
Donn Felker
GDE
89. How to create a Mutable Map in Kotlin
07:40
Donn Felker
GDE
90. Filtering and Transforming Maps in Kotlin
08:01
Donn Felker
GDE
91. Kotlin mapNotNull - Removing null items from a map
03:52
Donn Felker
GDE
92. Generate Large Sequences and Lists in Kotlin with generateSequence
02:49
Donn Felker
GDE
93. Kotlin Performance - Measuring performance with measureNanoTime
08:27
Donn Felker
GDE
94. Kotlin Sequences - Improving performance with Kotlin Sequences
12:45
Donn Felker
GDE
95. Kotlin - List vs. Set vs. Map
05:07
Donn Felker
GDE
96. The Kotlin Ternary Operator
01:25
Donn Felker
GDE
97. Kotlin Double Bang Operator !!
04:08
Donn Felker
GDE
98. Kotlin requireNotNull - Forcing something that is nullable to be not null
04:06
Donn Felker
GDE
99. Kotlin checkNotNull - Checking that a value is not null
02:01
Donn Felker
GDE
100. Filter a list for Not Null Values in Kotlin with filterNotNull
01:15
Donn Felker
GDE
101. Kotlin Type Hierarchy and Kotlin Type Checking with 'is'
06:32
Donn Felker
GDE
102. Casting in Kotlin
02:44
Donn Felker
GDE
103. Kotlin Safe Casting
03:22
Donn Felker
GDE
104. Understanding Generics with Lists and Maps in Kotlin
04:52
Donn Felker
GDE
105. Kotlin Generic Class - How to Create a Generic Class
07:16
Donn Felker
GDE
106. Throwing an Exception in Kotlin
02:48
Donn Felker
GDE
107. Kotlin - Creating a Custom Exception
02:50
Donn Felker
GDE
108. Kotlin Try Catch Statement
03:25
Donn Felker
GDE
109. Catching Multiple Exception Types in Kotlin
04:34
Donn Felker
GDE
110. Try/Catch/Finally in Kotlin
04:09
Donn Felker
GDE
111. Kotlin Try/Catch vs Try/Finally
02:35
Donn Felker
GDE
112. Kotlin typealias - How to create a typealias in Kotlin
03:11
Donn Felker
GDE
113. Creating a Kotlin Extension Function
08:36
Donn Felker
GDE
114. Kotlin Lazy Evaluation
03:12
Donn Felker
GDE
115. Kotlin Lazy Initializer Block
03:15
Donn Felker
GDE
116. Kotlin Packages and Imports
08:22
Donn Felker
GDE
117. Kotlin Type Inference
07:05
Donn Felker
GDE
118. Kotlin Lambdas - Understanding Simple Lambda Expressions
13:20
Donn Felker
GDE
119. Kotlin Lambdas - Lambdas as Function Parameters
05:54
Donn Felker
GDE
120. Kotlin Lambdas - Passing Values to Lambda Expression Function Parameters
11:14
Donn Felker
GDE
121. Kotlin Lambdas - Using Underscores to Signify Unused Parameters
02:47
Donn Felker
GDE
122. Kotlin Lambdas - The 'it' parameter
02:14
Donn Felker
GDE
123. Kotlin JVM Interop - Calling Kotlin from Java
03:01
Donn Felker
GDE
124. Kotlin JVM Interop - Calling Java from Kotlin
05:12
Donn Felker
GDE
125. Kotlin JVM Interop - Calling a Kotlin Extension Function from Java
03:00
Donn Felker
GDE
126. Kotlin JVM Interop - The JvmName Annotation
02:31
Donn Felker
GDE
127. Run Kotlin Code Anywhere with Kotlin Main Functions
00:54
Donn Felker
GDE
128. Working with the Kotlin REPL
02:37
Donn Felker
GDE
129. Kotlin Simple Calculator Project - Creating the Project and Main Function
02:03
Donn Felker
GDE
130. Kotlin Simple Calculator Project - Reading User Input with readLine()
04:21
Donn Felker
GDE
131. Kotlin Simple Calculator Project - Building the Calculator Logic
07:48
Donn Felker
GDE
132. Kotlin Simple Calculator Project - Adding Validation to your Simple Calculator
07:50
Donn Felker
GDE
133. Kotlin Simple Calculator Project - Compiling to a JAR File
02:27
Donn Felker
GDE
134. Kotlin Playground and Kotlin Koans
01:48
Donn Felker
GDE