1+ /*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON)
2+
3+ Licensed under the Apache License, Version 2.0 (the "License");
4+ you may not use this file except in compliance with the License.
5+ You may obtain a copy of the License at
6+
7+ http://www.apache.org/licenses/LICENSE-2.0
8+
9+ Unless required by applicable law or agreed to in writing, software
10+ distributed under the License is distributed on an "AS IS" BASIS,
11+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ See the License for the specific language governing permissions and
13+ limitations under the License.*/
14+
15+ package zuo .biao .apijson ;
16+
17+ import java .util .Collection ;
18+ import java .util .Map ;
19+
20+ /**可远程调用的函数列表
21+ * @author Lemon
22+ */
23+ public interface FunctionList {
24+
25+ //判断是否为空 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
26+ /**判断collection是否为空
27+ * @param collection
28+ * @return
29+ */
30+ public <T > boolean isEmpty (Collection <T > collection );
31+ /**判断map是否为空
32+ * @param <K>
33+ * @param <V>
34+ * @param map
35+ * @return
36+ */
37+ public <K , V > boolean isEmpty (Map <K , V > map );
38+ //判断是否为空 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
39+
40+ //判断是否为包含 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
41+ /**判断collection是否包含object
42+ * @param collection
43+ * @param object
44+ * @return
45+ */
46+ public <T > boolean isContain (Collection <T > collection , T object );
47+ /**判断map是否包含key
48+ * @param <K>
49+ * @param <V>
50+ * @param map
51+ * @param key
52+ * @return
53+ */
54+ public <K , V > boolean isContainKey (Map <K , V > map , K key );
55+ /**判断map是否包含value
56+ * @param <K>
57+ * @param <V>
58+ * @param map
59+ * @param value
60+ * @return
61+ */
62+ public <K , V > boolean isContainValue (Map <K , V > map , V value );
63+ //判断是否为包含 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
64+
65+
66+ //获取集合长度 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
67+ /**获取数量
68+ * @param <T>
69+ * @param array
70+ * @return
71+ */
72+ public <T > int count (T [] array );
73+ /**获取数量
74+ * @param <T>
75+ * @param collection List, Vector, Set等都是Collection的子类
76+ * @return
77+ */
78+ public <T > int count (Collection <T > collection );
79+ /**获取数量
80+ * @param <K>
81+ * @param <V>
82+ * @param map
83+ * @return
84+ */
85+ public <K , V > int count (Map <K , V > map );
86+ //获取集合长度 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
87+
88+
89+ //获取集合长度 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
90+ /**获取
91+ * @param <T>
92+ * @param array
93+ * @return
94+ */
95+ public <T > T get (T [] array , int position );
96+ /**获取
97+ * @param <T>
98+ * @param collection List, Vector, Set等都是Collection的子类
99+ * @return
100+ */
101+ public <T > T get (Collection <T > collection , int position );
102+ /**获取
103+ * @param <K>
104+ * @param <V>
105+ * @param map null ? null
106+ * @param key null ? null : map.get(key);
107+ * @return
108+ */
109+ public <K , V > V get (Map <K , V > map , K key );
110+ //获取集合长度 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
111+
112+
113+
114+ //获取非基本类型对应基本类型的非空值 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
115+ /**获取非空值
116+ * @param value
117+ * @return
118+ */
119+ public boolean value (Boolean value );
120+ /**获取非空值
121+ * @param value
122+ * @return
123+ */
124+ public int value (Integer value );
125+ /**获取非空值
126+ * @param value
127+ * @return
128+ */
129+ public long value (Long value );
130+ /**获取非空值
131+ * @param value
132+ * @return
133+ */
134+ public float value (Float value );
135+ /**获取非空值
136+ * @param value
137+ * @return
138+ */
139+ public double value (Double value );
140+ //获取非基本类型对应基本类型的非空值 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
141+
142+ }
0 commit comments