Java List Print print(List list)

Here you can find the source of print(List list)

Description

print

License

Apache License

Declaration

private static List<Integer> print(List<Integer> list) 

Method Source Code


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

import java.util.List;
import java.util.Map;
import java.util.Set;

public class Main {
    private static List<Integer> print(List<Integer> list) {
        System.out.println(list.getClass().toString());
        for (Integer integer : list) {
            System.out.println(integer);
        }// w  ww  .jav a 2s  . co m
        System.out.println("===================");

        return list;
    }

    private static Set<Integer> print(Set<Integer> set) {
        System.out.println(set.getClass().toString());
        for (Integer integer : set) {
            System.out.println(integer);
        }
        System.out.println("===================");

        return set;
    }

    private static Map<Integer, Integer> print(Map<Integer, Integer> map) {
        System.out.println(map.getClass().toString());
        Set<Map.Entry<Integer, Integer>> entrySet = map.entrySet();
        for (Map.Entry<Integer, Integer> entry : entrySet) {
            System.out.println(entry.getKey() + " : " + entry.getValue());
        }
        System.out.println("===================");

        return map;
    }
}

Related

  1. print(int totalErrors, int totalTechnical, int totalSuccess, List filesWithErrorsList)
  2. print(Iterable list)
  3. print(List A, String mode)
  4. print(List items)
  5. print(List list)
  6. print(List list)
  7. print(Map> map)
  8. print_int(List l)
  9. printArgument(List parameters, StringBuilder sb)

    HOME | Copyright © www.java2s.com 2016