Here you can find the source of sortByByteDeux(List
public static ArrayList<ArrayList<Character>> sortByByteDeux(List<Character> symbolAL, int delimiter)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static ArrayList<ArrayList<Character>> sortByByteDeux(List<Character> symbolAL, int delimiter) { ArrayList<Character> bucketOneAL = new ArrayList<Character>(); ArrayList<Character> bucketTwoAL = new ArrayList<Character>(); for (int i = 0; i < symbolAL.size(); i += 2) { String byteS = symbolAL.get(i).toString() + symbolAL.get(i + 1).toString(); int tempI = Integer.parseInt(byteS, 16); if (tempI > delimiter) { bucketTwoAL.add(symbolAL.get(i)); bucketTwoAL.add(symbolAL.get(i + 1)); } else { bucketOneAL.add(symbolAL.get(i)); bucketOneAL.add(symbolAL.get(i + 1)); }//from w ww.j ava 2 s . co m } ArrayList<ArrayList<Character>> returnL = new ArrayList<ArrayList<Character>>(); returnL.add(bucketOneAL); returnL.add(bucketTwoAL); return returnL; } }