> + result.offer(q.poll());
> + return result;
> + }
> +
> + /**
> + * Build a TreeHash based on a map of hashed chunks.
> + *
> + * @return A String containing the calculated TreeHash.
> + */
> + public static String buildTreeHashFromMap(Map<Integer, String> map) {
> + //Sort the Map with the hash parts.
> + TreeMap<Integer, String> sortedMap = Maps.newTreeMap();
> + sortedMap.putAll(map);
> +
> + //Convert the strings and add them to our queue.
> + Queue<HashCode> q = Lists.newLinkedList();
Does the `Queue` offer anything that an `ArrayList` does not? You only append
elements and never remove them. `ArrayList` has better constant-factor
efficiency.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/9/files#r13771709