Java tutorial
//package com.java2s; import java.util.LinkedList; public class Main { private static final int SEGMENTSIZE = 5000; public static void add2Sequence(LinkedList<String> sequenceList, String url) { if (sequenceList.size() <= SEGMENTSIZE) { sequenceList.add(url); System.out.println("sequence no: " + sequenceList.size()); } else { } } }