File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -91,16 +91,28 @@ snippet v
91
91
# #
92
92
# # Declaration for ArrayList
93
93
snippet d.al
94
- List<${1: Object } > ${2: list } = ArrayList<$1 >;${0}
94
+ List<${1: Object } > ${2: list } = new ArrayList<$1 >() ;${0}
95
95
# # Declaration for HashMap
96
96
snippet d.hm
97
- Map<${1: Object } , ${2: Object } > ${3: map } = HashMap<$1 , $2 >;${0}
97
+ Map<${1: Object } , ${2: Object } > ${3: map } = new HashMap<$1 , $2 >() ;${0}
98
98
# # Declaration for HashSet
99
99
snippet d.hs
100
- Set<${1: Object } > ${2: set } = HashSet<$1 >;${0}
100
+ Set<${1: Object } > ${2: set } = new HashSet<$1 >() ;${0}
101
101
# # Declaration for Stack
102
102
snippet d.st
103
- Stack<${1: Object } > ${2: stack } = Stack<$1 >;${0}
103
+ Stack<${1: Object } > ${2: stack } = new Stack<$1 >();${0}
104
+ # #
105
+ # # Singleton Pattern
106
+ snippet singlet
107
+ private static class Holder {
108
+ private static final ${1: `vim_snippets#Filename("$1 ")` } INSTANCE = new $1 ();
109
+ }
110
+
111
+ private $1 () { }
112
+
113
+ private static $1 getInstance() {
114
+ return Holder.INSTANCE;
115
+ }
104
116
# #
105
117
# # Enhancements to Methods, variables, classes, etc.
106
118
snippet ab
You can’t perform that action at this time.
0 commit comments