How to check if TreeMap> contains a value? in Java

前端 未结 3 391
刺人心
刺人心 2021-01-28 14:39

I\'m just wondering how to check if TreeMap> contains a value in Java? For Example:

/*I have TreeMap> map with these element         


        
3条回答
  •  执念已碎
    2021-01-28 15:33

    Something like below would work

     Map> map=new TreeMap>();
                Collection> values=map.values();
                for(ArrayList list:values)
                {
                    list.contains("text_to_search")
                    {
    
                    }
                }
    

提交回复
热议问题