jar
jinlin
2025-03-10 f0aae4b39afbcbb18fb5a0b32e3ca689662c5ca7
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
package com.example.client.utils;
 
import com.example.client.dto.JComboBoxItem;
 
public class BoxIteUtils {
    public static JComboBoxItem GetSelectItemByName(JComboBoxItem[] list,String name){
        JComboBoxItem item1 = null;
        for (JComboBoxItem item : list){
            if(item.getName().equals(name)){
                item1 = item;
            }
        }
        return item1;
    }
 
    public static JComboBoxItem GetSelectItemById(JComboBoxItem[] list,Long id){
        JComboBoxItem item1 = null;
        for (JComboBoxItem item : list){
            if(id.equals(item.getId())){
                item1 = item;
            }
        }
        return item1;
    }
}