Top Constructors Methods
com.sun.jmx.mbeanserver

public Class Util

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .Comparator, .HashMap, .HashSet, .IdentityHashMap, .LinkedHashMap, .List, .Map, .Set, .SortedMap, .TreeMap, javax.management.MalformedObjectNameException, .ObjectName

Constructor Summary

AccessConstructor and Description
public
Util()

Method Summary

Modifier and TypeMethod and Description
public static <T> T
public static int

Returns:

a hash code value, as described in hashCode(Descriptor)
hashCode
(String[]
the sorted array of descriptor names.
names
,
Object[]
the array of descriptor values.
values
)

Computes a descriptor hashcode from its names and values.

pack-priv static <K, V> IdentityHashMap<K, V>
pack-priv static <K, V> Map<K, V>
pack-priv static <E> List<E>
pack-priv static <E> List<E>
pack-priv static <K, V> Map<K, V>
public static ObjectName
pack-priv static <E> Set<E>
pack-priv static <E> Set<E>
pack-priv static <K, V> SortedMap<K, V>
pack-priv static <K, V> SortedMap<K, V>
newSortedMap(Comparator<? super K> comp)

pack-priv static <K, V> Map<K, V>
pack-priv static <K, V> Map<K, V>
public static boolean

Returns:

true if and only if the string matches the pattern.
wildmatch
(final String
the string containing the sequence to match.
str
,
final String
a string containing a pattern to match the sub string against.
pat
,
int
the index in the string at which matching should begin.
stri
,
final int
the index in the string at which the matching should end.
strend
,
int
the index in the pattern at which matching should begin.
pati
,
final int
the index in the pattern at which the matching should end.
patend
)

Match a part of a string against a shell-style pattern.

public static boolean

Returns:

true if and only if the string matches the pattern.
wildmatch
(String
the string to match.
str
,
String
the pattern to match the string against.
pat
)

Match a string against a shell-style pattern.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilback to summary
public Util()

Method Detail

castback to summary
public static <T> T cast(Object x)
Annotations
@SuppressWarnings:unchecked
hashCodeback to summary
public static int hashCode(String[] names, Object[] values)

Computes a descriptor hashcode from its names and values.

Parameters
names:String[]

the sorted array of descriptor names.

values:Object[]

the array of descriptor values.

Returns:int

a hash code value, as described in hashCode(Descriptor)

newIdentityHashMapback to summary
pack-priv static <K, V> IdentityHashMap<K, V> newIdentityHashMap()
newInsertionOrderMapback to summary
pack-priv static <K, V> Map<K, V> newInsertionOrderMap()
newListback to summary
pack-priv static <E> List<E> newList()
newListback to summary
pack-priv static <E> List<E> newList(Collection<E> c)
newMapback to summary
pack-priv static <K, V> Map<K, V> newMap()
newObjectNameback to summary
public static ObjectName newObjectName(String string)
newSetback to summary
pack-priv static <E> Set<E> newSet()
newSetback to summary
pack-priv static <E> Set<E> newSet(Collection<E> c)
newSortedMapback to summary
pack-priv static <K, V> SortedMap<K, V> newSortedMap()
newSortedMapback to summary
pack-priv static <K, V> SortedMap<K, V> newSortedMap(Comparator<? super K> comp)
newSynchronizedIdentityHashMapback to summary
pack-priv static <K, V> Map<K, V> newSynchronizedIdentityHashMap()
newSynchronizedMapback to summary
pack-priv static <K, V> Map<K, V> newSynchronizedMap()
wildmatchback to summary
public static boolean wildmatch(final String str, final String pat, int stri, final int strend, int pati, final int patend)

Match a part of a string against a shell-style pattern. The only pattern characters recognized are ?, standing for any one character, and *, standing for any string of characters, including the empty string. For instance, wildmatch("sandwich","sa?d*ch",1,4,1,4) will match "and" against "a?d".

Parameters
str:String

the string containing the sequence to match.

pat:String

a string containing a pattern to match the sub string against.

stri:int

the index in the string at which matching should begin.

strend:int

the index in the string at which the matching should end.

pati:int

the index in the pattern at which matching should begin.

patend:int

the index in the pattern at which the matching should end.

Returns:boolean

true if and only if the string matches the pattern.

wildmatchback to summary
public static boolean wildmatch(String str, String pat)

Match a string against a shell-style pattern. The only pattern characters recognized are ?, standing for any one character, and *, standing for any string of characters, including the empty string.

Parameters
str:String

the string to match.

pat:String

the pattern to match the string against.

Returns:boolean

true if and only if the string matches the pattern.