Java Doc for Collections.java in  » Apache-Harmony-Java-SE » java-package » java » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Collections

Collections
public class Collections (Code)
Collections contains static methods which operate on Collection classes.
since:
   1.2

Inner Class :static class SynchronizedCollection implements Collection<E>,Serializable
Inner Class :static class SynchronizedRandomAccessList extends SynchronizedList implements RandomAccess
Inner Class :static class SynchronizedList extends SynchronizedCollection implements List<E>
Inner Class :static class SynchronizedMap implements Map<K, V>,Serializable
Inner Class :static class SynchronizedSet extends SynchronizedCollection implements Set<E>
Inner Class :static class SynchronizedSortedMap extends SynchronizedMap implements SortedMap<K, V>
Inner Class :static class SynchronizedSortedSet extends SynchronizedSet implements SortedSet<E>

Field Summary
final public static  ListEMPTY_LIST
     An immutable, serializable, empty List.
final public static  MapEMPTY_MAP
     An immutable, serializable, empty Map.
final public static  SetEMPTY_SET
     An immutable, serializable, empty Set.


Method Summary
public static  booleanaddAll(Collection<? super T> c, T... a)
    
public static  intbinarySearch(List<? extends Comparable<? super T>> list, T object)
     Performs a binary search for the specified element in the specified sorted List.
public static  intbinarySearch(List<? extends T> list, T object, Comparator<? super T> comparator)
     Performs a binary search for the specified element in the specified sorted List using the specified Comparator. <
Parameters:
  T - > The element type
Parameters:
  list - the sorted List to search
Parameters:
  object - the element to find
Parameters:
  comparator - the Comparator.
static  EcheckType(E obj, Class<E> type)
     Checks if specified object is instance of specified class.
public static  Collection<E>checkedCollection(Collection<E> c, Class<E> type)
     Returns a dynamically typesafe view of the specified collection.
public static  List<E>checkedList(List<E> list, Class<E> type)
     Returns a dynamically typesafe view of the specified list.
public static  Map<K, V>checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType)
     Returns a dynamically typesafe view of the specified map.
public static  Set<E>checkedSet(Set<E> s, Class<E> type)
     Returns a dynamically typesafe view of the specified set.
public static  SortedMap<K, V>checkedSortedMap(SortedMap<K, V> m, Class<K> keyType, Class<V> valueType)
     Returns a dynamically typesafe view of the specified sorted map.
public static  SortedSet<E>checkedSortedSet(SortedSet<E> s, Class<E> type)
     Returns a dynamically typesafe view of the specified sorted set.
public static  voidcopy(List<? super T> destination, List<? extends T> source)
     Copies the elements from the source list to the destination list.
public static  booleandisjoint(Collection c1, Collection c2)
    
final public static  List<T>emptyList()
     Returns a type-safe empty, immutable List .
final public static  Map<K, V>emptyMap()
     Returns a type-safe empty, immutable Map .
final public static  Set<T>emptySet()
     Returns a type-safe empty, immutable Set .
public static  Enumeration<T>enumeration(Collection<T> collection)
     Answers an Enumeration on the specified Collection.
public static  voidfill(List<? super T> list, T object)
     Fills the specified List with the specified element.
public static  intfrequency(Collection c, Object o)
    

Returns the number of elements in the Collection that match the Object passed.

public static  intindexOfSubList(List list, List sublist)
     Searches the list for sublist and answers the beginning index of the first occurrence.
public static  intlastIndexOfSubList(List list, List sublist)
     Searches the list for sublist and answers the beginning index of the last occurrence.
public static  ArrayList<T>list(Enumeration<T> enumeration)
     Answers an ArrayList with all the elements in the enumeration.
public static  Tmax(Collection<? extends T> collection)
     Searches the specified Collection for the maximum element.
public static  Tmax(Collection<? extends T> collection, Comparator<? super T> comparator)
     Searches the specified Collection for the maximum element using the specified Comparator.
public static  Tmin(Collection<? extends T> collection)
     Searches the specified Collection for the minimum element.
public static  Tmin(Collection<? extends T> collection, Comparator<? super T> comparator)
     Searches the specified Collection for the minimum element using the specified Comparator.
public static  List<T>nCopies(int length, T object)
     Answers a List containing the specified number of the specified element.
public static  booleanreplaceAll(List<T> list, T obj, T obj2)
     Replaces all occurrences of Object obj in list with newObj.
public static  voidreverse(List list)
     Returns the supplied List with the order of its contained elements reversed.
public static  Comparator<T>reverseOrder()
    

A Comparator which reverses the natural order of the elements.

public static  Comparator<T>reverseOrder(Comparator<T> c)
    

Returns a Comparator that reverses the order of the Comparator passed.

public static  voidrotate(List lst, int dist)
     Rotates the elements in List list by the distance dist

e.g.

public static  voidshuffle(List list)
     Moves every element of the List to a random new position in the list.
public static  voidshuffle(List list, Random random)
     Moves every element of the List to a random new position in the list using the specified random number generator.
public static  Set<E>singleton(E object)
     Answers a Set containing the specified element.
public static  List<E>singletonList(E object)
     Answers a List containing the specified element.
public static  Map<K, V>singletonMap(K key, V value)
     Answers a Map containing the specified key and value.
public static  voidsort(List<T> list)
     Sorts the specified List in ascending order.
public static  voidsort(List<T> list, Comparator<? super T> comparator)
     Sorts the specified List using the specified Comparator.
public static  voidswap(List list, int index1, int index2)
    
public static  Collection<T>synchronizedCollection(Collection<T> collection)
     Answers a wrapper on the specified Collection which synchronizes all access to the Collection.
public static  List<T>synchronizedList(List<T> list)
     Answers a wrapper on the specified List which synchronizes all access to the List.
public static  Map<K, V>synchronizedMap(Map<K, V> map)
     Answers a wrapper on the specified Map which synchronizes all access to the Map.
public static  Set<E>synchronizedSet(Set<E> set)
     Answers a wrapper on the specified Set which synchronizes all access to the Set.
public static  SortedMap<K, V>synchronizedSortedMap(SortedMap<K, V> map)
     Answers a wrapper on the specified SortedMap which synchronizes all access to the SortedMap.
public static  SortedSet<E>synchronizedSortedSet(SortedSet<E> set)
     Answers a wrapper on the specified SortedSet which synchronizes all access to the SortedSet.
public static  Collection<E>unmodifiableCollection(Collection<? extends E> collection)
     Answers a wrapper on the specified Collection which throws an UnsupportedOperationException whenever an attempt is made to modify the Collection.
public static  List<E>unmodifiableList(List<? extends E> list)
     Answers a wrapper on the specified List which throws an UnsupportedOperationException whenever an attempt is made to modify the List.
public static  Map<K, V>unmodifiableMap(Map<? extends K, ? extends V> map)
     Answers a wrapper on the specified Map which throws an UnsupportedOperationException whenever an attempt is made to modify the Map.
public static  Set<E>unmodifiableSet(Set<? extends E> set)
     Answers a wrapper on the specified Set which throws an UnsupportedOperationException whenever an attempt is made to modify the Set.
public static  SortedMap<K, V>unmodifiableSortedMap(SortedMap<K, ? extends V> map)
     Answers a wrapper on the specified SortedMap which throws an UnsupportedOperationException whenever an attempt is made to modify the SortedMap.
public static  SortedSet<E>unmodifiableSortedSet(SortedSet<E> set)
     Answers a wrapper on the specified SortedSet which throws an UnsupportedOperationException whenever an attempt is made to modify the SortedSet.

Field Detail
EMPTY_LIST
final public static List EMPTY_LIST(Code)
An immutable, serializable, empty List.
See Also:   Collections.emptyList



EMPTY_MAP
final public static Map EMPTY_MAP(Code)
An immutable, serializable, empty Map.
See Also:   Collections.emptyMap



EMPTY_SET
final public static Set EMPTY_SET(Code)
An immutable, serializable, empty Set.
See Also:   Collections.emptySet





Method Detail
addAll
public static boolean addAll(Collection<? super T> c, T... a)(Code)
Adds all the specified elements to the specified collection
Parameters:
  c - the collection the elements are to be inserted into
Parameters:
  a - the elements to insert true if the collection changed during insertion
throws:
  UnsupportedOperationException - when the method is not supported
throws:
  NullPointerException - when c or elements is null, or elements contains one or morenull elements and c doesn't support null elements



binarySearch
public static int binarySearch(List<? extends Comparable<? super T>> list, T object)(Code)
Performs a binary search for the specified element in the specified sorted List.
Parameters:
  list - the sorted List to search
Parameters:
  object - the element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted
throws:
  ClassCastException - when an element in the List or the search element does notimplement Comparable, or cannot be compared to each other



binarySearch
public static int binarySearch(List<? extends T> list, T object, Comparator<? super T> comparator)(Code)
Performs a binary search for the specified element in the specified sorted List using the specified Comparator. <
Parameters:
  T - > The element type
Parameters:
  list - the sorted List to search
Parameters:
  object - the element to find
Parameters:
  comparator - the Comparator. If the comparator is null thenthe search uses the objects' natural ordering. the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted
throws:
  ClassCastException - when an element in the list and the searched element cannotbe compared to each other using the Comparator



checkType
static E checkType(E obj, Class<E> type)(Code)
Checks if specified object is instance of specified class. Used for a dynamically typesafe view of the collections.
Parameters:
  obj - -object is to be checked
Parameters:
  type - -class of object that should be specified object



checkedCollection
public static Collection<E> checkedCollection(Collection<E> c, Class<E> type)(Code)
Returns a dynamically typesafe view of the specified collection.
Parameters:
  c - the collection
Parameters:
  type - the type of the elements is permitted to insert a typesafe collection



checkedList
public static List<E> checkedList(List<E> list, Class<E> type)(Code)
Returns a dynamically typesafe view of the specified list.
Parameters:
  list - the list
Parameters:
  type - the type of the elements is permitted to insert a typesafe list



checkedMap
public static Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, Class<V> valueType)(Code)
Returns a dynamically typesafe view of the specified map.
Parameters:
  m - the map
Parameters:
  keyType - the type of keys permitted to be inserted
Parameters:
  valueType - the type of values permitted to be inserted a typesafe map



checkedSet
public static Set<E> checkedSet(Set<E> s, Class<E> type)(Code)
Returns a dynamically typesafe view of the specified set.
Parameters:
  s - the set
Parameters:
  type - the type of the elements is permitted to insert a typesafe set



checkedSortedMap
public static SortedMap<K, V> checkedSortedMap(SortedMap<K, V> m, Class<K> keyType, Class<V> valueType)(Code)
Returns a dynamically typesafe view of the specified sorted map.
Parameters:
  m - the sorted map
Parameters:
  keyType - the type of keys permitted to be inserted
Parameters:
  valueType - the type of values permitted to be inserted a typesafe sorted map



checkedSortedSet
public static SortedSet<E> checkedSortedSet(SortedSet<E> s, Class<E> type)(Code)
Returns a dynamically typesafe view of the specified sorted set.
Parameters:
  s - the sorted set
Parameters:
  type - the type of the elements is permitted to insert a typesafe sorted set



copy
public static void copy(List<? super T> destination, List<? extends T> source)(Code)
Copies the elements from the source list to the destination list.
Parameters:
  destination -
Parameters:
  source -
throws:
  IndexOutOfBoundsException - when the destination List is smaller than the source List
throws:
  UnsupportedOperationException - when replacing an element in the destination list is notsupported



disjoint
public static boolean disjoint(Collection c1, Collection c2)(Code)
Returns true if the collections have no elements in common
Parameters:
  c1 - the first collection
Parameters:
  c2 - the second collection true if the collections have no elements in common
throws:
  NullPointerException - if one of the collections is null



emptyList
final public static List<T> emptyList()(Code)
Returns a type-safe empty, immutable List . An empty List.
since:
   1.5
See Also:   Collections.EMPTY_LIST



emptyMap
final public static Map<K, V> emptyMap()(Code)
Returns a type-safe empty, immutable Map . An empty Map.
since:
   1.5
See Also:   Collections.EMPTY_MAP



emptySet
final public static Set<T> emptySet()(Code)
Returns a type-safe empty, immutable Set . An empty Set.
since:
   1.5
See Also:   Collections.EMPTY_SET



enumeration
public static Enumeration<T> enumeration(Collection<T> collection)(Code)
Answers an Enumeration on the specified Collection.
Parameters:
  collection - the Collection to enumerate an Enumeration



fill
public static void fill(List<? super T> list, T object)(Code)
Fills the specified List with the specified element.
Parameters:
  list - the List to fill
Parameters:
  object - the fill element
throws:
  UnsupportedOperationException - when replacing an element in the List is not supported



frequency
public static int frequency(Collection c, Object o)(Code)

Returns the number of elements in the Collection that match the Object passed. If the Object is null, then the number of null elements is returned.


Parameters:
  c - The Collection to search.
Parameters:
  o - The Object to search for. The number of matching elements.
throws:
  NullPointerException - if the Collection parameter isnull.
since:
   1.5



indexOfSubList
public static int indexOfSubList(List list, List sublist)(Code)
Searches the list for sublist and answers the beginning index of the first occurrence.

-1 is returned if the sublist does not exist in list
Parameters:
  list - the List to search sublist in
Parameters:
  sublist - the List to search in list the beginning index of the first occurrence ofsublist in list, or -1




lastIndexOfSubList
public static int lastIndexOfSubList(List list, List sublist)(Code)
Searches the list for sublist and answers the beginning index of the last occurrence.

-1 is returned if the sublist does not exist in list
Parameters:
  list - the List to search sublist in
Parameters:
  sublist - the List to search in list the beginning index of the last occurrence ofsublist in list, or -1




list
public static ArrayList<T> list(Enumeration<T> enumeration)(Code)
Answers an ArrayList with all the elements in the enumeration. The elements in the returned ArrayList are in the same order as in the enumeration.
Parameters:
  enumeration - Enumeration and ArrayList



max
public static T max(Collection<? extends T> collection)(Code)
Searches the specified Collection for the maximum element.
Parameters:
  collection - the Collection to search the maximum element in the Collection
throws:
  ClassCastException - when an element in the Collection does not implementComparable or elements cannot be compared to each other



max
public static T max(Collection<? extends T> collection, Comparator<? super T> comparator)(Code)
Searches the specified Collection for the maximum element using the specified Comparator.
Parameters:
  collection - the Collection to search
Parameters:
  comparator - the Comparator the maximum element in the Collection
throws:
  ClassCastException - when elements in the Collection cannot be compared to eachother using the Comparator



min
public static T min(Collection<? extends T> collection)(Code)
Searches the specified Collection for the minimum element.
Parameters:
  collection - the Collection to search the minimum element in the Collection
throws:
  ClassCastException - when an element in the Collection does not implementComparable or elements cannot be compared to each other



min
public static T min(Collection<? extends T> collection, Comparator<? super T> comparator)(Code)
Searches the specified Collection for the minimum element using the specified Comparator.
Parameters:
  collection - the Collection to search
Parameters:
  comparator - the Comparator the minimum element in the Collection
throws:
  ClassCastException - when elements in the Collection cannot be compared to eachother using the Comparator



nCopies
public static List<T> nCopies(int length, T object)(Code)
Answers a List containing the specified number of the specified element. The list cannot be modified.
Parameters:
  length - the size of the returned List
Parameters:
  object - the element a List containing length copies of the element
throws:
  IllegalArgumentException - when length < 0



replaceAll
public static boolean replaceAll(List<T> list, T obj, T obj2)(Code)
Replaces all occurrences of Object obj in list with newObj. If the obj is null, then all occurrences of null is replaced with newObj.
Parameters:
  list - the List to modify
Parameters:
  obj - the Object to find and replace occurrences of.
Parameters:
  obj2 - the Object to replace all occurrences of obj inlist true, if at least one occurrence of obj has beenfound in list
throws:
  UnsupportedOperationException - if the list does not support setting elements



reverse
public static void reverse(List list)(Code)
Returns the supplied List with the order of its contained elements reversed.
Parameters:
  list - the List to reverse
throws:
  UnsupportedOperationException - when replacing an element in the List is not supported



reverseOrder
public static Comparator<T> reverseOrder()(Code)

A Comparator which reverses the natural order of the elements. The Comparator that's returned is Serializable .

A Comparator instance.
See Also:   Comparator
See Also:   Comparable
See Also:   Serializable



reverseOrder
public static Comparator<T> reverseOrder(Comparator<T> c)(Code)

Returns a Comparator that reverses the order of the Comparator passed. If the Comparator passed is null, then this method is equivalent to Collections.reverseOrder() .

The Comparator that's returned is Serializable if the Comparator passed is serializable or null.


Parameters:
  c - The Comparator to reverse or null. A Comparator instance.
See Also:   Comparator
since:
   1.5



rotate
public static void rotate(List lst, int dist)(Code)
Rotates the elements in List list by the distance dist

e.g. for a given list with elements [1, 2, 3, 4, 5, 6, 7, 8, 9, 0], calling rotate(list, 3) or rotate(list, -7) would modify the list to look like this: [8, 9, 0, 1, 2, 3, 4, 5, 6, 7]
Parameters:
  lst -
Parameters:
  dist - It can be any integer: 0, positive, negative, larger than thelist size




shuffle
public static void shuffle(List list)(Code)
Moves every element of the List to a random new position in the list.
Parameters:
  list - the List to shuffle
throws:
  UnsupportedOperationException - when replacing an element in the List is not supported



shuffle
public static void shuffle(List list, Random random)(Code)
Moves every element of the List to a random new position in the list using the specified random number generator.
Parameters:
  list - the List to shuffle
Parameters:
  random - the random number generator
throws:
  UnsupportedOperationException - when replacing an element in the List is not supported



singleton
public static Set<E> singleton(E object)(Code)
Answers a Set containing the specified element. The set cannot be modified.
Parameters:
  object - the element a Set containing the element



singletonList
public static List<E> singletonList(E object)(Code)
Answers a List containing the specified element. The list cannot be modified.
Parameters:
  object - the element a List containing the element



singletonMap
public static Map<K, V> singletonMap(K key, V value)(Code)
Answers a Map containing the specified key and value. The map cannot be modified.
Parameters:
  key - the key
Parameters:
  value - the value a Map containing the key and value



sort
public static void sort(List<T> list)(Code)
Sorts the specified List in ascending order.
Parameters:
  list - the List to be sorted
throws:
  ClassCastException - when an element in the List does not implement Comparable orelements cannot be compared to each other



sort
public static void sort(List<T> list, Comparator<? super T> comparator)(Code)
Sorts the specified List using the specified Comparator.
Parameters:
  list - the List to be sorted
Parameters:
  comparator - the Comparator
throws:
  ClassCastException - when elements in the List cannot be compared to each otherusing the Comparator



swap
public static void swap(List list, int index1, int index2)(Code)
Swaps the elements of List list at indices index1 and index2
Parameters:
  list - the List to manipulate on
Parameters:
  index1 - int position of the first element to swap with the element inindex2
Parameters:
  index2 - int position of the other element
throws:
  IndexOutOfBoundsException - if index1 or index2 is out of range of this list



synchronizedCollection
public static Collection<T> synchronizedCollection(Collection<T> collection)(Code)
Answers a wrapper on the specified Collection which synchronizes all access to the Collection.
Parameters:
  collection - the Collection a synchronized Collection



synchronizedList
public static List<T> synchronizedList(List<T> list)(Code)
Answers a wrapper on the specified List which synchronizes all access to the List.
Parameters:
  list - the List a synchronized List



synchronizedMap
public static Map<K, V> synchronizedMap(Map<K, V> map)(Code)
Answers a wrapper on the specified Map which synchronizes all access to the Map.
Parameters:
  map - the Map a synchronized Map



synchronizedSet
public static Set<E> synchronizedSet(Set<E> set)(Code)
Answers a wrapper on the specified Set which synchronizes all access to the Set.
Parameters:
  set - the Set a synchronized Set



synchronizedSortedMap
public static SortedMap<K, V> synchronizedSortedMap(SortedMap<K, V> map)(Code)
Answers a wrapper on the specified SortedMap which synchronizes all access to the SortedMap.
Parameters:
  map - the SortedMap a synchronized SortedMap



synchronizedSortedSet
public static SortedSet<E> synchronizedSortedSet(SortedSet<E> set)(Code)
Answers a wrapper on the specified SortedSet which synchronizes all access to the SortedSet.
Parameters:
  set - the SortedSet a synchronized SortedSet



unmodifiableCollection
public static Collection<E> unmodifiableCollection(Collection<? extends E> collection)(Code)
Answers a wrapper on the specified Collection which throws an UnsupportedOperationException whenever an attempt is made to modify the Collection.
Parameters:
  collection - the Collection an unmodifiable Collection



unmodifiableList
public static List<E> unmodifiableList(List<? extends E> list)(Code)
Answers a wrapper on the specified List which throws an UnsupportedOperationException whenever an attempt is made to modify the List.
Parameters:
  list - the List an unmodifiable List



unmodifiableMap
public static Map<K, V> unmodifiableMap(Map<? extends K, ? extends V> map)(Code)
Answers a wrapper on the specified Map which throws an UnsupportedOperationException whenever an attempt is made to modify the Map.
Parameters:
  map - the Map a unmodifiable Map



unmodifiableSet
public static Set<E> unmodifiableSet(Set<? extends E> set)(Code)
Answers a wrapper on the specified Set which throws an UnsupportedOperationException whenever an attempt is made to modify the Set.
Parameters:
  set - the Set a unmodifiable Set



unmodifiableSortedMap
public static SortedMap<K, V> unmodifiableSortedMap(SortedMap<K, ? extends V> map)(Code)
Answers a wrapper on the specified SortedMap which throws an UnsupportedOperationException whenever an attempt is made to modify the SortedMap.
Parameters:
  map - the SortedMap a unmodifiable SortedMap



unmodifiableSortedSet
public static SortedSet<E> unmodifiableSortedSet(SortedSet<E> set)(Code)
Answers a wrapper on the specified SortedSet which throws an UnsupportedOperationException whenever an attempt is made to modify the SortedSet.
Parameters:
  set - the SortedSet a unmodifiable SortedSet



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.