How can I create an immutable List consisting of n Copies of an Object?
Location: http://www.jguru.com/faq/view.jsp?EID=1262461 Created: Sep 14, 2005 Author: Brandon Rohlfs (http://www.jguru.com/guru/viewbio.jsp?EID=1245666) nCopies(int n, T o) can be used to create an immutable List which contains a specific number of copies of an Object. Care must be taken when trying to add elements to or extract elements from the returned List. Both attempts will throw UnsupportedOperationExceptions. public static