Java List Value Add All AddToList(List tips, String tip)

Here you can find the source of AddToList(List tips, String tip)

Description

Add To List

License

Apache License

Declaration

public static void AddToList(List<String> tips, String tip) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static void AddToList(List<String> tips, String tip) {
        for (String exist : tips) {
            if (exist.equals(tip)) {
                return;
            }/*ww w .j a  va2  s .  c o m*/
        }
        tips.add(tip);
    }
}

Related

  1. addArrayToList(List list, T[] array)
  2. addArrayToList(String[] array, List list)
  3. addArrayToList(T[] array, List list)
  4. addToList(List list, Object obj)
  5. addToList(List list, I item)
  6. addToList(List dest, T src)
  7. addToList(List list, T value)
  8. addToList(List list, T[] array)
  9. addToList(List list, U... items)