Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.management.oss.impl.util
Class Util

    java.lang.Object
      com.sun.management.oss.impl.util.Util

public final class Util
extends java.lang.Object

Utility class with some utility methods. (says it all doesn't it... :-)

Version:
  0.2
Author:
  Henrik Lindstr?m

Constructor Summary
`Util()`

Method Summary
`static java.lang.Object` | `clone(java.lang.Object obj)` Try to clone any object if possible.
`static java.lang.Object` | `clone(java.lang.Object[] obj)`
`static boolean` | `compareArrays(java.lang.Object[] attributeValue1, java.lang.Object[] attributeValue2)`
`static java.lang.String` | `convertUTCTimeString(java.util.Date date)`
`static boolean` | `isEqual(java.lang.Object objectA, java.lang.Object objectB)`
`static boolean` | `isObjectEqual(java.lang.Object objectA, java.lang.Object objectB)`
`static java.lang.String` | `makeGUID(java.lang.Object object)` Creates a GUID for an object.
`static java.lang.String` | `printObject(java.lang.Object value)`
`static java.lang.String` | `printObject(java.lang.Object[] value)`
`static java.lang.String` | `rightJustify(int width, java.lang.String field)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Util

    public Util()

Method Detail

### clone

    public static java.lang.Object clone(java.lang.Object obj)
                                  throws java.lang.CloneNotSupportedException

  Try to clone any object if possible. If it is not possible the original object is returned.

  Parameters:
    `obj` - object to clone
  Returns:
    cloned object or obj if not possible
  Throws:
    `java.lang.CloneNotSupportedException`

### clone

    public static java.lang.Object clone(java.lang.Object[] obj)
                                  throws java.lang.CloneNotSupportedException

  Throws:
    `java.lang.CloneNotSupportedException`

### printObject

    public static java.lang.String printObject(java.lang.Object[] value)

### printObject

    public static java.lang.String printObject(java.lang.Object value)

### makeGUID

    public static java.lang.String makeGUID(java.lang.Object object)

  Creates a GUID for an object. GUID stands for Globally Unique IDentifier a.k.a. UUIDs (Universally Unique IDentifier). The GUID (128-bits) is guaranteed to be unique. Implementation follows the EJB primary key design pattern, see The Server Side, design patterns.

  The GUID is built up like this:

        System.currentTimeMillis()  System.identityHashCode(object)
        |                           |
        XXXXXXXX      XXXXXXXX      XXXXXXXXX      XXXXXXXX
                      |                            |
                      IP-address                   Random number

  Note, the first call to this method might be very slow (seconds) because the SecureRandom class is initialized.

  For details see:
  http://www.theserverside.com
  http://casl.csa.iisc.ernet.in/Standards/internet-drafts/draft-leach-uuids-guids-01.txt

### isEqual

    public static boolean isEqual(java.lang.Object objectA,
                                  java.lang.Object objectB)

### isObjectEqual

    public static boolean isObjectEqual(java.lang.Object objectA,
                                        java.lang.Object objectB)

### compareArrays

    public static boolean compareArrays(java.lang.Object[] attributeValue1,
                                        java.lang.Object[] attributeValue2)

### rightJustify

    public static java.lang.String rightJustify(int width,
                                                java.lang.String field)

### convertUTCTimeString

    public static java.lang.String convertUTCTimeString(java.util.Date date)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD