Satyam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bestray.labinformationsystem.util;
import com.bestray.healthcarecommonutil.vo.TCCodeType;
import com.bestray.healthcarecommonutil.vo.TCCodeValues;
import java.util.Vector;
/**
*
* @author User1
*/
public class CollectionUtill {
/**
* Gets the code type index.
*
* @param codeTypeList the code type list
* @param codeTypeId the code type id
* @return the code type index
*/
public static int getCodeTypeIndex(Vector<TCCodeType> codeTypeList, Integer codeTypeId) {
int index = -1;
if (codeTypeList != null && codeTypeId != null) {
for (int i = 0; i < codeTypeList.size(); i++) {
if (codeTypeId.intValue() == codeTypeList.get(i).getCodeTypeId().intValue()) {
index = i;
break;
}
}
}
return index;
}
/**
* Gets the code value index.
*
* @param codeValueList the code value list
* @param codeValueName the code value name
* @return the code value index
*/
public static int getCodeValueIndex(Vector<TCCodeValues> codeValueList,String codeValueName) {
int index = -1;
if (codeValueList != null && codeValueName != null) {
for (int i = 0; i < codeValueList.size(); i++) {
if (codeValueName.equalsIgnoreCase(codeValueList.get(i).getCodeValueName().toString())) {
index = i;
break;
}
}
}
return index;
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Fri 20 Jul, 2018 05:59:17 +0000 |
|