Skip to content
This repository was archived by the owner on Aug 17, 2019. It is now read-only.

Commit 7c6bc3b

Browse files
committed
Add apply() to PropsBase
1 parent 0ac87b1 commit 7c6bc3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/scala/com/ckkloverdos/props/PropsBase.scala

+9-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@ trait PropsBase[K, V, P <: PropsBase[K, V, P]] {
4141

4242
/**
4343
* Get a value or throw an exception if it does not exist.
44+
*
4445
*/
46+
@inline
4547
@throws(classOf[NoSuchElementException])
46-
def getEx(key: K): V = map apply key
48+
def getEx(key: K): V = this(key)
49+
50+
/**
51+
* Get a value or throw an exception if it does not exist.
52+
*/
53+
@throws(classOf[NoSuchElementException])
54+
def apply(key: K): V = map apply key
4755

4856
def get(key: K): Maybe[V] = map.get(key): Maybe[V]
4957

0 commit comments

Comments
 (0)