Java List Contain ContainsInList(String list, String value)

Here you can find the source of ContainsInList(String list, String value)

Description

Contains In List

License

Open Source License

Declaration

public static Boolean ContainsInList(String list, String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static Boolean ContainsInList(String list, String value) {
        if (list == null) {
            return false;
        } else {//from  w w  w  . ja v a2s .c o m
            return Arrays.asList(list.split(",\\s*")).contains(value);
        }
    }
}

Related

  1. containsIgnoreCase(List list, String soughtFor)
  2. containsIgnoreCase(String str, String... list)
  3. containsInAnyOrder(final List test, final List control)
  4. containsIndex(int index, List objects)
  5. containsInEach(List first, List second)
  6. containsInOrder(List a, List b)
  7. containsInstance(final List list, final Class clazz)
  8. containsInstance(List list, Object object)
  9. containsItems(List smallerList, List largerList)