Skip to content

Commit eaafb4b

Browse files
committed
feat: add TypeSafeMap
1 parent 1fef6a4 commit eaafb4b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.lokic</groupId>
88
<artifactId>java-plus</artifactId>
9-
<version>0.1.3</version>
9+
<version>0.1.4</version>
1010
<name>java-plus</name>
1111
<description>Provide some useful extensions on the basis of java8 to make java more usable.</description>
1212
<url>https://github.com/lokic/java-plus</url>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.github.lokic.javaplus;
2+
3+
import java.util.Map;
4+
5+
public class TypeSafeMap {
6+
7+
private final Map<?, ?> map;
8+
9+
public TypeSafeMap(Map<?, ?> map) {
10+
this.map = map;
11+
}
12+
13+
public <K, V> Map<K, V> getMap() {
14+
return Types.cast(map);
15+
}
16+
}

0 commit comments

Comments
 (0)