Here you can find the source of cloneProbabilities( List
Parameter | Description |
---|---|
targetProbs | a parameter |
public static ArrayList<Integer> cloneProbabilities( List<Integer> targetProbs)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { /**//from w ww . ja v a 2 s . c om * @param targetProbs * @return */ public static ArrayList<Integer> cloneProbabilities( List<Integer> targetProbs) { if (targetProbs != null && !targetProbs.isEmpty()) { ArrayList<Integer> copy = new ArrayList<Integer>( targetProbs.size()); for (int index = 0; index < targetProbs.size(); index++) { copy.add(targetProbs.get(index)); } return copy; } else { return null; } } }