Chapter 12. The java.lang PackageThe java.lang package contains the classes that are most central to the Java language. As you can see from Figure 12-1, the class hierarchy is broad rather than deep, which means that the classes are independent of each other. Figure 12-1. The java.lang packageObject is the ultimate superclass of all Java classes and is therefore at the top of all class hierarchies. Class is a class that describes a Java class. There is one Class object for each class that is loaded into Java. Boolean, Character, Byte, Short, Integer, Long, Float, and Double are immutable class wrappers around each of the primitive Java data types. These classes are useful when you need to manipulate primitive types as objects. They also contain useful conversion and utility methods. String and StringBuffer are objects that represent strings. String is an immutable type, while StringBuffer can have its string changed in place. In Java 1.2 and later, all these classes (except StringBuffer) implement the Comparable interface, which enables sorting and searching algorithms. The Math class (and, in Java 1.3, the StrictMath class) defines static methods for various floating-point mathematical functions. The Thread class provides support for multiple threads of control running within the same Java interpreter. The Runnable interface is implemented by objects that have a run() method that can serve as the body of a thread. System provides low-level system methods. Runtime provides similar low-level methods, including an exec() method that, along with the Process class, defines an API for running external processes. Throwable is the root class of the exception and error hierarchy. Throwable objects are used with the Java throw and catch statements. java.lang defines quite a few subclasses of Throwable. Exception and Error are the superclasses of all exceptions and errors. Figure 12-2 and Figure 12-3 show the class hierarchies for these core Java exceptions and errors. Figure 12-2. The exception classes in the java.lang packageFigure 12-3. The error classes in the java.lang package
Signals an attempt to invoke an abstract method.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError-->AbstractMethodError
A RuntimeException that signals an exceptional arithmetic condition, such as integer division by zero.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->ArithmeticException
Signals that an array index less than zero or greater than or equal to the array size has been used.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IndexOutOfBoundsException-->ArrayIndexOutOfBoundsException Thrown By: Too many methods to list.
Signals an attempt to store the wrong type of object into an array.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->ArrayStoreException
This class provides an immutable object wrapper around the boolean primitive type. Note that the TRUE and FALSE constants are Boolean objects; they are not the same as the true and falseboolean values. As of Java 1.1, this class defines a Class constant that represents the boolean type. booleanValue() returns the boolean value of a Boolean object. The class method getBoolean() retrieves the boolean value of a named property from the system property list. The class method valueOf() parses a string and returns the boolean value it represents.
Hierarchy: Object-->Boolean(Serializable) Passed To: javax.swing.DefaultDesktopManager.setWasIcon() Returned By: Boolean.valueOf(), javax.swing.filechooser.FileView.isTraversable() Type Of: java.awt.font.TextAttribute.{RUN_DIRECTION_LTR, RUN_DIRECTION_RTL, STRIKETHROUGH_ON, SWAP_COLORS_ON}, Boolean.{FALSE, TRUE}
This class provides an object wrapper around the byte primitive type. It defines useful constants for the minimum and maximum values that can be stored by the byte type and a Class object constant that represents the byte type. It also provides various methods for converting Byte values to and from strings and other numeric types. Most of the static methods of this class can convert a String to a Byte object or a byte value: the four parseByte() and valueOf() methods parse a number from the specified string using an optionally specified radix and return it in one of these two forms. The decode() method parses a byte specified in base 10, base 8, or base 16 and returns it as a Byte. If the string begins with "0x" or "#", it is interpreted as a hexadecimal number. If it begins with "0", it is interpreted as an octal number. Otherwise, it is interpreted as a decimal number. Note that this class has two toString() methods. One is static and converts a byte primitive value to a string; the other is the usual toString() method that converts a Byte object to a string. Most of the remaining methods convert a Byte to various primitive numeric types.
Hierarchy: Object-->Number(Serializable)-->Byte(Comparable) Passed To: Byte.compareTo() Returned By: Byte.{decode(), valueOf()}
This class provides an immutable object wrapper around the primitive char data type. charValue() returns the char value of a Character object. A number of class methods provide the Java/Unicode equivalent of the C <ctype.h> character macros for checking the type of characters and converting to uppercase and lowercase letters. getType() returns the character type. The return value is one of the constants defined by the class, which represents a number of broad Unicode character categories. digit() returns the integer equivalent of a given character for a given radix (e.g., radix 16 for hexadecimal). forDigit() returns the character that corresponds to the specified value for the specified radix.
Hierarchy: Object-->Character(Comparable,Serializable) Passed To: Character.compareTo()
This class represents a named subset of the Unicode character set. The toString() method returns the name of the subset. This is a base class intended for further subclassing. Note, in particular, that it does not provide a way to list the members of the subset, nor a way to test for membership in the subset. See Character.UnicodeBlock.
Subclasses: java.awt.im.InputSubset, Character.UnicodeBlock Passed To: java.awt.im.InputContext.setCharacterSubsets(), java.awt.im.spi.InputMethod.setCharacterSubsets()
This subclass of Character.Subset defines a number of constants that represent named subsets of the Unicode character set. The subsets and their names are the "character blocks" defined by the Unicode 2.0 specification (see http://www.unicode.org/ ). The static method of() takes a character and returns the Character.UnicodeBlock to which it belongs, or null if it is not part of any defined block. When presented with an unknown Unicode character, this method provides a useful way to determine what alphabet it belongs to.
Returned By: Character.UnicodeBlock.of() Type Of: Too many fields to list.
This class represents a Java class or interface, or, as of Java 1.1, any Java type. There is one Class object for each class that is loaded into the Java Virtual Machine, and, as of Java 1.1, there are special Class objects that represent the Java primitive types. The TYPE constants defined by Boolean, Integer, and the other primitive wrapper classes hold these special Class objects. Array types are also represented by Class objects in Java 1.1. There is no constructor for this class. You can obtain a Class object by calling the getClass() method of any instance of the desired class. In Java 1.1 and later, you can also refer to a Class object by appending .class to the name of a class. Finally, and most interestingly, a class can be dynamically loaded by passing its fully qualified name (i.e., package name plus class name) to the static Class.forName() method. This method loads the named class (if it is not already loaded) into the Java interpreter and returns a Class object for it. Classes can also be loaded with a ClassLoader object. The newInstance() method creates an instance of a given class; this allows you to create instances of dynamically loaded classes for which you cannot use the new keyword. Note that this method only works when the target class has a no-argument constructor. See newInstance() in java.lang.reflect.Constructor for a more powerful way to instantiate dynamically loaded classes. getName() returns the name of the class. getSuperclass() returns its superclass. isInterface() tests whether the Class object represents an interface, and getInterfaces() returns an array of the interfaces that this class implements. In Java 1.2 and later, getPackage() returns a Package object that represents the package containing the class. getProtectionDomain() returns the java.security.ProtectionDomain to which this class belongs. The various other get() and is() methods return other information about the represented class; they form part of the Java Reflection API, along with the classes in java.lang.reflect.
Hierarchy: Object-->Class(Serializable) Passed To: Too many methods to list. Returned By: Too many methods to list. Type Of: java.beans.beancontext.BeanContextServiceAvailableEvent.serviceClass, java.beans.beancontext.BeanContextServiceRevokedEvent.serviceClass, Boolean.TYPE, Byte.TYPE, Character.TYPE, Double.TYPE, Float.TYPE, Integer.TYPE, Long.TYPE, Short.TYPE, Void.TYPE
Signals an invalid cast of an object to a type of which it is not an instance.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->ClassCastException
Signals that a circular dependency has been detected while performing initialization for a class.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->ClassCircularityError
Signals an error in the binary format of a class file.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->ClassFormatError Subclasses: UnsupportedClassVersionError Thrown By: ClassLoader.defineClass()
This class is the abstract superclass of objects that know how to load Java classes into a Java VM. Given a ClassLoader object, you can dynamically load a class by calling the public loadClass() method, specifying the full name of the desired class. You can obtain a resource associated with a class by calling getResource(), getResources(), and getResourceAsStream(). Many applications do not need to use ClassLoader directly; these applications use the Class.forName() and Class.getResource() methods to dynamically load classes and resources using the ClassLoader object that loaded the application itself. In order to load classes over the network or from any source other than the standard system classes, you must use a custom ClassLoader object that knows how to obtain data from that source. A java.net.URLClassLoader is suitable for this purpose for almost all applications. Only rarely should an application need to define a ClassLoader subclass of its own. When this is necessary, the subclass should typically extend java.security.SecureClassLoader and override the findClass() method. This method must find the bytes that comprise the named class, then pass them to the defineClass() method and return the resulting Class object. In Java 1.2 and later, the findClass() method must also define the Package object associated with the class, if it has not already been defined. It can use getPackage() and definePackage() for this purpose. Custom subclasses of ClassLoader should also override findResource() and findResources() to enable the public getResource() and getResources() methods.
Subclasses: java.security.SecureClassLoader Passed To: Too many methods to list. Returned By: Class.getClassLoader(), ClassLoader.{getParent(), getSystemClassLoader()}, SecurityManager.currentClassLoader(), Thread.getContextClassLoader(), java.rmi.server.RMIClassLoader.getClassLoader()
Signals that a class to be loaded cannot be found.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->ClassNotFoundException Thrown By: Too many methods to list.
This interface defines no methods or variables, but indicates that the class that implements it may be cloned (i.e., copied) by calling the Object method clone(). Calling clone() for an object that does not implement this interface (and does not override clone() with its own implementation) causes a CloneNotSupportedException to be thrown.
Implementations: Too many classes to list.
Signals that the clone() method has been called for an object of a class that does not implement the Cloneable interface.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->CloneNotSupportedException Subclasses: java.rmi.server.ServerCloneException Thrown By: java.awt.datatransfer.DataFlavor.clone(), Object.clone(), java.rmi.server.UnicastRemoteObject.clone(), java.security.MessageDigest.clone(), java.security.MessageDigestSpi.clone(), java.security.Signature.clone(), java.security.SignatureSpi.clone(), javax.crypto.Mac.clone(), javax.crypto.MacSpi.clone(), javax.swing.AbstractAction.clone(), javax.swing.DefaultListSelectionModel.clone(), javax.swing.tree.DefaultTreeSelectionModel.clone()
This interface defines a single method, compareTo(), that is responsible for comparing one object to another and determining their relative order, according to some natural ordering for that class of objects. Any general-purpose class that represents a value that can be sorted or ordered should implement this interface. Any class that does implement this interface can make use of various powerful methods such as java.util.Collections.sort() and java.util.Arrays.binarySearch(). As of Java 1.2, many of the key classes in the Java API have been modified to implement this interface. The compareTo() object compares this object to the object passed as an argument. It should assume that the supplied object is of the appropriate type; if it is not, it should throw a ClassCastException. If this object is less than the supplied object or should appear before the supplied object in a sorted list, compareTo() should return a negative number. If this object is greater than the supplied object or should come after the supplied object in a sorted list, compareTo() should return a positive integer. If the two objects are equivalent, and their relative order in a sorted list does not matter, compareTo() should return 0. If compareTo() returns 0 for two objects, the equals() method should typically return true. If this is not the case, the Comparable objects are not suitable for use in java.util.TreeSet and java.util.TreeMap classes. See java.util.Comparator for a way to define an ordering for objects that do not implement Comparable or to define an ordering other than the natural ordering defined by a Comparable class.
Implementations: java.io.File, java.io.ObjectStreamField, Byte, Character, Double, Float, Integer, Long, Short, String, java.math.BigDecimal, java.math.BigInteger, java.text.CollationKey, java.util.Date
The static methods of this class provide an interface to the just-in-time (JIT) byte-code-to-native code compiler in use by the Java interpreter. If no JIT compiler is in use by the VM, these methods do nothing. compileClass() asks the JIT compiler to compile the specified class. compileClasses() asks the JIT compiler to compile all classes that match the specified name. These methods return true if the compilation was successful, or false if it failed or if there is no JIT compiler on the system. enable() and disable() turn just-in-time compilation on and off. command() asks the JIT compiler to perform some compiler-specific operation; this is a hook for vendor extensions. No standard operations have been defined.
This class provides an immutable object wrapper around the double primitive data type. valueOf() converts a string to a Double, doubleValue() returns the primitive double value of a Double object, and there are other methods for returning a Double value as a variety of other primitive types. This class also provides some useful constants and static methods for testing double values. MIN_VALUE and MAX_VALUE are the smallest (closest to zero) and largest representable double values. isInfinite() in class and instance method forms tests whether a double or a Double has an infinite value. Similarly, isNaN() tests whether a double or Double is not-a-number; this is a comparison that cannot be done directly because the NaN constant never tests equal to any other value, including itself. doubleToLongBits() and longBitsToDouble() allow you to manipulate the bit representation of a double directly.
Hierarchy: Object-->Number(Serializable)-->Double(Comparable) Passed To: Double.compareTo() Returned By: Double.valueOf()
This class forms the root of the error hierarchy in Java. Subclasses of Error, unlike subclasses of Exception, should not be caught and generally cause termination of the program. Subclasses of Error need not be declared in the throws clause of a method definition. getMessage() returns a message associated with the error. See Throwable for other methods.
Hierarchy: Object-->Throwable(Serializable)-->Error Subclasses: java.awt.AWTError, LinkageError, ThreadDeath, VirtualMachineError Passed To: java.rmi.ServerError.ServerError()
This class forms the root of the exception hierarchy in Java. An Exception signals an abnormal condition that must be specially handled to prevent program termination. Exceptions may be caught and handled. An exception that is not a subclass of RuntimeException must be declared in the throws clause of any method that can throw it. getMessage() returns a message associated with the exception. See Throwable for other methods.
Hierarchy: Object-->Throwable(Serializable)-->Exception Subclasses: Too many classes to list. Passed To: Too many methods to list. Returned By: java.awt.event.InvocationEvent.getException(), java.security.PrivilegedActionException.getException(), javax.ejb.EJBException.getCausedByException(), javax.jms.JMSException.getLinkedException(), org.omg.CORBA.Environment.exception() Thrown By: java.rmi.server.RemoteCall.executeCall(), java.rmi.server.RemoteRef.invoke(), java.rmi.server.Skeleton.dispatch(), java.security.PrivilegedExceptionAction.run(), javax.naming.spi.NamingManager.getObjectInstance(), javax.naming.spi.ObjectFactory.getObjectInstance() Type Of: java.io.WriteAbortedException.detail, java.rmi.server.ServerCloneException.detail
This error is thrown by the Java Virtual Machine when an exception occurs in the static initializer of a class. You can use the getException() method to obtain the Throwable object that was thrown from the initializer.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->ExceptionInInitializerError
This class provides an immutable object wrapper around the float primitive data type. valueOf() converts a string to a Float, floatValue() returns the primitive float value of a Float object, and there are methods for returning a Float value as a variety of other primitive types. This class also provides some useful constants and static methods for testing float values. MIN_VALUE and MAX_VALUE are the smallest (closest to zero) and largest representable double values. isInfinite() in class and instance method forms tests whether a float or a Float has an infinite value. Similarly, isNaN() tests whether a float or Float is not-a-number; this is a comparison that cannot be done directly because the NaN constant never tests equal to any other value, including itself. floatToIntBits() and intBitsToFloat() allow you to manipulate the bit representation of a float directly.
Hierarchy: Object-->Number(Serializable)-->Float(Comparable) Passed To: Float.compareTo() Returned By: Float.valueOf() Type Of: Too many fields to list.
Signals an attempted use of a class, method, or field that is not accessible.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError-->IllegalAccessError
Signals that a class or initializer is not accessible. Thrown by Class.newInstance().
Hierarchy: Object-->Throwable(Serializable)-->Exception-->IllegalAccessException Thrown By: Too many methods to list.
Signals an illegal argument to a method. See subclasses IllegalThreadStateException and NumberFormatException.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IllegalArgumentException Subclasses: IllegalThreadStateException, NumberFormatException, java.security.InvalidParameterException Thrown By: Too many methods to list.
Signals an illegal monitor state. It is thrown by the Objectnotify() and wait() methods used for thread synchronization.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IllegalMonitorStateException
Signals that a method has been invoked on an object that is not in an appropriate state to perform the requested operation.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->java.lang.IllegalStateException Subclasses: java.awt.IllegalComponentStateException, java.awt.dnd.InvalidDnDOperationException Thrown By: Too many methods to list.
Signals that a thread is not in the appropriate state for an attempted operation to succeed.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IllegalArgumentException-->IllegalThreadStateException
This is the superclass of a group of related error types. It signals some kind of illegal use of a legal class.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError Subclasses: AbstractMethodError, IllegalAccessError, InstantiationError, NoSuchFieldError, NoSuchMethodError
Signals that an index is out of bounds. See the subclasses ArrayIndexOutOfBoundsException and StringIndexOutOfBoundsException.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IndexOutOfBoundsException Subclasses: ArrayIndexOutOfBoundsException, StringIndexOutOfBoundsException Thrown By: java.awt.Toolkit.createCustomCursor(), java.awt.print.Book.{getPageFormat(), getPrintable(), setPage()}, java.awt.print.Pageable.{getPageFormat(), getPrintable()}
This class holds a thread-local value that is inherited by child threads. See ThreadLocal for a discussion of thread-local values. Note that the inheritance referred to in the name of this class is not superclass-to-subclass inheritance; instead, it is parent-thread-to-child-thread inheritance. This class is best understood by example. Suppose that an application has defined an InheritableThreadLocal object and that a certain thread (the parent thread) has a thread-local value stored in that object. Whenever that thread creates a new thread (a child thread), the InheritableThreadLocal object is automatically updated so that the new child thread has the same value associated with it as the parent thread. Note that the value associated with the child thread is independent from the value associated with the parent thread. If the child thread subsequently alters its value by calling the set() method of the InheritableThreadLocal, the value associated with the parent thread does not change. By default, a child thread inherits a parent's values unmodified. By overriding the childValue() method, however, you can create a subclass of InheritableThreadLocal in which the child thread inherits some arbitrary function of the parent thread's value.
Hierarchy: Object-->ThreadLocal-->InheritableThreadLocal
Signals an attempt to instantiate an interface or abstract class.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError-->InstantiationError
Signals an attempt to instantiate an interface or an abstract class.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->InstantiationException Thrown By: Class.newInstance(), java.lang.reflect.Constructor.newInstance(), javax.swing.UIManager.setLookAndFeel()
This class provides an immutable object wrapper around the int primitive data type. This class also contains useful minimum and maximum constants and useful conversion methods. parseInt() and valueOf() convert a string to an int or to an Integer, respectively. Each can take a radix argument to specify the base the value is represented in. decode() also converts a String to an Integer. It assumes a hexadecimal number if the string begins with "0X" or "0x", or an octal number if the string begins with "0". Otherwise, a decimal number is assumed. toString() converts in the other direction, and the static version takes a radix argument. toBinaryString(), toOctalString(), and toHexString() convert an int to a string using base 2, base 8, and base 16. These methods treat the integer as an unsigned value. Other routines return the value of an Integer as various primitive types, and, finally, the getInteger() methods return the integer value of a named property from the system property list, or the specified default value.
Hierarchy: Object-->Number(Serializable)-->Integer(Comparable) Passed To: Integer.{compareTo(), getInteger()}, javax.swing.JInternalFrame.setLayer() Returned By: Integer.{decode(), getInteger(), valueOf()}, javax.swing.JLayeredPane.getObjectForLayer() Type Of: java.awt.font.TextAttribute.{SUPERSCRIPT_SUB, SUPERSCRIPT_SUPER, UNDERLINE_LOW_DASHED, UNDERLINE_LOW_DOTTED, UNDERLINE_LOW_GRAY, UNDERLINE_LOW_ONE_PIXEL, UNDERLINE_LOW_TWO_PIXEL, UNDERLINE_ON}, javax.swing.JLayeredPane.{DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER}
Signals an internal error in the Java interpreter.
Hierarchy: Object-->Throwable(Serializable)-->Error-->VirtualMachineError-->InternalError
Signals that the thread has been interrupted.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->InterruptedException Thrown By: Too many methods to list.
The superclass of a group of errors that signal problems linking a class or resolving dependencies between classes.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError Subclasses: ClassCircularityError, ClassFormatError, ExceptionInInitializerError, IncompatibleClassChangeError, NoClassDefFoundError, UnsatisfiedLinkError, VerifyError
This class provides an immutable object wrapper around the long primitive data type. This class also contains useful minimum and maximum constants and useful conversion methods. parseLong() and valueOf() convert a string to a long or to a Long, respectively. Each can take a radix argument to specify the base the value is represented in. toString() converts in the other direction and may also take a radix argument. toBinaryString(), toOctalString(), and toHexString() convert a long to a string using base 2, base 8, and base 16. These methods treat the long as an unsigned value. Other routines return the value of a Long as various primitive types, and, finally, the getLong() methods return the long value of a named property or the value of the specified default.
Hierarchy: Object-->Number(Serializable)-->Long(Comparable) Passed To: Long.{compareTo(), getLong()} Returned By: Long.{decode(), getLong(), valueOf()}
This class defines constants for the mathematical values e and π and defines static methods for floating-point trigonometry, exponentiation, and other operations. It is the equivalent of the C <math.h> functions. It also contains methods for computing minimum and maximum values and for generating pseudo-random numbers. Most methods of Math operate on float and double floating-point values. Remember that these values are only approximations of actual real numbers. To allow implementations to take full advantage of the floating-point capabilities of a native platform, the methods of Math are not required to return exactly the same values on all platforms. In other words, the results returned by different implementations may differ slightly in the least-significant bits. In Java 1.3, applications that require strict platform-independence of results should use StrictMath instead.
Signals an attempt to allocate an array with fewer than zero elements.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->NegativeArraySizeException Thrown By: java.lang.reflect.Array.newInstance()
Signals that the definition of a specified class cannot be found.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->NoClassDefFoundError
Signals that a specified field cannot be found.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError-->NoSuchFieldError
This exception signals that the specified field does not exist in the specified class.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->NoSuchFieldException Thrown By: Class.{getDeclaredField(), getField()}
Signals that a specified method cannot be found.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->IncompatibleClassChangeError-->NoSuchMethodError
Signals that the specified method does not exist in the specified class.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->NoSuchMethodException Thrown By: Class.{getConstructor(), getDeclaredConstructor(), getDeclaredMethod(), getMethod()}
Signals an attempt to access a field or invoke a method of a null object.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->NullPointerException Thrown By: java.awt.print.PrinterJob.setPageable()
This is an abstract class that is the superclass of Byte, Short, Integer, Long, Float, and Double. It defines the conversion functions those types implement.
Hierarchy: Object-->Number(Serializable) Subclasses: Byte, Double, Float, Integer, Long, Short, java.math.BigDecimal, java.math.BigInteger Passed To: java.awt.Button.AccessibleAWTButton.setCurrentAccessibleValue(), java.awt.Checkbox.AccessibleAWTCheckbox.setCurrentAccessibleValue(), java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem.setCurrentAccessibleValue(), java.awt.MenuItem.AccessibleAWTMenuItem.setCurrentAccessibleValue(), java.awt.Scrollbar.AccessibleAWTScrollBar.setCurrentAccessibleValue(), javax.accessibility.AccessibleValue.setCurrentAccessibleValue(), javax.swing.AbstractButton.AccessibleAbstractButton.setCurrentAccessibleValue(), javax.swing.JInternalFrame.AccessibleJInternalFrame.setCurrentAccessibleValue(), javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.setCurrentAccessibleValue(), javax.swing.JProgressBar.AccessibleJProgressBar.setCurrentAccessibleValue(), javax.swing.JScrollBar.AccessibleJScrollBar.setCurrentAccessibleValue(), javax.swing.JSlider.AccessibleJSlider.setCurrentAccessibleValue(), javax.swing.JSplitPane.AccessibleJSplitPane.setCurrentAccessibleValue() Returned By: Too many methods to list.
Signals an illegal number format.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IllegalArgumentException-->NumberFormatException Thrown By: Too many methods to list.
This is the root class in Java. All classes are subclasses of Object, and thus all objects can invoke the public and protected methods of this class. equals() tests whether two objects have the same value (not whether two variables refer to the same object, but whether two distinct objects have byte-for-byte equivalence). For classes that implement the Cloneable interface, clone() makes a byte-for-byte copy of an Object. getClass() returns the Class object associated with any Object, and the notify(), notifyAll(), and wait() methods are used for thread synchronization on a given Object. A number of these Object methods should be overridden by subclasses of Object. For example, a subclass should provide its own definition of the toString() method so that it can be used with the string concatenation operator and with the PrintWriter.println() methods. Defining the toString() method for all objects also helps with debugging. A class that contains references to other objects may want to override the equals() and clone() methods (for Cloneable objects) so that it recursively calls the equals() and clone() methods of the objects referred to within the original object. Some classes, particularly those that override equals(), may also want to override the hashCode() method to provide an appropriate hashcode to be used when storing instances in a Hashtable data structure. A class that allocates system resources other than memory (such as file descriptors or windowing system graphic contexts) should override the finalize() method to release these resources when the object is no longer referred to and is about to be garbage-collected.
Subclasses: Too many classes to list. Passed To: Too many methods to list. Returned By: Too many methods to list. Type Of: Too many fields to list.
Signals that the interpreter has run out of memory (and that garbage collection is unable to free any memory).
Hierarchy: Object-->Throwable(Serializable)-->Error-->VirtualMachineError-->OutOfMemoryError
This class represents a Java package. You can obtain the Package object for a given Class by calling the getPackage() method of the Class object. The static Package.getPackage() method returns a Package object for the named package, if any such package has been loaded by the current class loader. Similarly, the static Package.getPackages() returns all Package objects that have been loaded by the current class loader. Note that a Package object is not defined unless at least one class has been loaded from that package. Although you can obtain the Package of a given Class, you cannot obtain an array of Class objects contained in a specified Package. If the classes that comprise a package are contained in a JAR file that has the appropriate attributes set in its manifest file, the Package object allows you to query the title, vendor, and version of both the package specification and the package implementation; all six values are strings. The specification version string has a special format. It consists of one or more integers, separated from each other by periods. Each integer can have leading zeros, but is not considered an octal digit. Increasing numbers indicate later versions. The isCompatibleWith() method calls getSpecificationVersion() to obtain the specification version and compares it with the version string supplied as an argument. If the package-specification version is the same as or greater than the specified string, isCompatibleWith() returns true. This allows you to test whether the version of a package (typically a standard extension) is new enough for the purposes of your application. Packages may be sealed, which means that all classes in the package must come from the same JAR file. If a package is sealed, the no-argument version of isSealed() returns true. The one-argument version of isSealed() returns true if the specified URL represents the JAR file from which the package is loaded.
Returned By: Class.getPackage(), ClassLoader.{definePackage(), getPackage(), getPackages()}, Package.{getPackage(), getPackages()}, java.net.URLClassLoader.definePackage()
This class describes a process that is running externally to the Java interpreter. Note that a Process is very different from a Thread; the Process class is abstract and cannot be instantiated. Call one of the Runtime.exec() methods to start a process and return a corresponding Process object. waitFor() blocks until the process exits. exitValue() returns the exit code of the process. destroy() kills the process. getErrorStream() returns an InputStream from which you can read any bytes the process sends to its standard error stream. getInputStream() returns an InputStream from which you can read any bytes the process sends to its standard output stream. getOutputStream() returns an OutputStream you can use to send bytes to the standard input stream of the process.
Returned By: Runtime.exec()
This interface specifies the run() method that is required to use with the Thread class. Any class that implements this interface can provide the body of a thread. See Thread for more information.
Implementations: java.awt.image.renderable.RenderableImageProducer, Thread, java.util.TimerTask, javax.jms.Session, javax.swing.text.AsyncBoxView.ChildState Passed To: java.awt.EventQueue.{invokeAndWait(), invokeLater()}, java.awt.event.InvocationEvent.InvocationEvent(), Thread.Thread(), javax.swing.SwingUtilities.{invokeAndWait(), invokeLater()}, javax.swing.text.AbstractDocument.render(), javax.swing.text.Document.render(), javax.swing.text.LayoutQueue.addTask() Returned By: javax.swing.text.LayoutQueue.waitForWork() Type Of: java.awt.event.InvocationEvent.runnable
This class encapsulates a number of platform-dependent system functions. The static method getRuntime() returns the Runtime object for the current platform; this object can perform system functions in a platform-independent way. exit() causes the Java interpreter to exit and return a specified return code. This method is usually invoked through System.exit(). In Java 1.3, addShutdownHook() registers an unstarted Thread object that is run when the virtual machine shuts down, either through a call to exit() or through a user interrupt (a CTRL-C, for example). The purpose of a shutdown hook is to perform necessary cleanup, such as shutting down network connections, deleting temporary files, and so on. Any number of hooks can be registered with addShutdownHook(). Before the interpreter exits, it starts all registered shutdown-hook threads and lets them run concurrently. Any hooks you write should perform their cleanup operation and exit promptly so they do not delay the shutdown process. To remove a shutdown hook before it is run, call removeShutdownHook(). To force an immediate exit that does not invoke the shutdown hooks, call halt(). exec() starts a new process running externally to the interpreter. Note that any processes run outside of Java may be system-dependent. freeMemory() returns the approximate amount of free memory. totalMemory() returns the total amount of memory available to the Java interpreter. gc() forces the garbage collector to run synchronously, which may free up more memory. Similarly, runFinalization() forces the finalize() methods of unreferenced objects to be run immediately. This may free up system resources those objects were holding. load() loads a dynamic library with a fully specified pathname. loadLibrary() loads a dynamic library with only the library name specified; it looks in platform-dependent locations for the specified library. These libraries generally contain native code definitions for native methods. traceInstructions() and traceMethodCalls() enable and disable tracing by the interpreter. These methods are used for debugging or profiling an application. It is not specified how the VM emits the trace information, and VMs are not even required to support this feature. Note that some of the Runtime methods are more commonly called via the static methods of the System class.
Returned By: Runtime.getRuntime()
This exception type is not used directly, but serves as a superclass of a group of run-time exceptions that need not be declared in the throws clause of a method definition. These exceptions need not be declared because they are runtime conditions that can generally occur in any Java method. Thus, declaring them would be unduly burdensome, and Java does not require it.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException Subclasses: Too many classes to list.
This class is a java.security.Permission that represents access to various important system facilities. A RuntimePermission has a name, or target, that represents the facility for which permission is being sought or granted. The name "exitVM" represents permission to call System.exit(), and the name "accessClassInPackage.java.lang" represents permission to read classes from the java.lang package. The name of a RuntimePermission may use a ".*" suffix as a wildcard. For example, the name "accessClassInPackage.java.*" represents permission to read classes from any package whose name begins with "java.". RuntimePermission does not use action list strings as some Permission classes do; the name of the permission alone is enough. Supported RuntimePermssion names are: "accessClassInPackage.package", "accessDeclaredMembers", "createClassLoader", "createSecurityManager", "defineClassInPackage.package", "exitVM", "getClassLoader", "getProtectionDomain", "loadLibrary.library_name", "modifyThread", "modifyThreadGroup", "queuePrintJob", "readFileDescriptor", "set-ContextClassLoader", "setFactory", "setIO", "setSecurityManager", "stopThread", and "writeFileDescriptor". System administrators configuring security policies should be familiar with these permission names, the operations they govern access to, and with the risks inherent in granting any of them. Although system programmers may need to work with this class, application programmers should never need to use RuntimePermssion directly.
Hierarchy: Object-->java.security.Permission(java.security.Guard,Serializable)-->java.security.BasicPermission(Serializable)-->RuntimePermission
Signals that an operation is not permitted for security reasons.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->SecurityException Subclasses: java.rmi.RMISecurityException, java.security.AccessControlException Thrown By: Too many methods to list.
This class defines the methods necessary to implement a security policy for the safe execution of untrusted code. Before performing potentially sensitive operations, Java calls methods of the SecurityManager object currently in effect to determine whether the operations are permitted. These methods throw a SecurityException if the operation is not permitted. Typical applications do not need to use or subclass SecurityManager. It is typically used only by web browsers, applet viewers, and other programs that need to run untrusted code in a controlled environment. Prior to Java 1.2, this class is abstract, and the default implementation of each check() method throws a SecurityException unconditionally. The Java security mechanism has been overhauled as of Java 1.2. As part of the overhaul, this class is no longer abstract and its methods have useful default implementations, so there is rarely a need to subclass it. If so, the method returns silently; if not, it throws a SecurityException. checkPermission() operates by invoking the checkPermission() method of the system java.security.AccessController object. In Java 1.2 and later, all other check() methods of SecurityManager are now implemented on top of checkPermission().
Subclasses: java.rmi.RMISecurityManager Passed To: System.setSecurityManager() Returned By: System.getSecurityManager()
This class provides an object wrapper around the short primitive type. It defines useful constants for the minimum and maximum values that can be stored by the short type, and also a Class object constant that represents the short type. It also provides various methods for converting Short values to and from strings and other numeric types. Most of the static methods of this class can convert a String to a Short object or a short value; the four parseShort() and valueOf() methods parse a number from the specified string using an optionally specified radix and return it in one of these two forms. The decode() method parses a number specified in base 10, base 8, or base 16 and returns it as a Short. If the string begins with "0x" or "#", it is interpreted as a hexadecimal number; if it begins with "0", it is interpreted as an octal number. Otherwise, it is interpreted as a decimal number. Note that this class has two different toString() methods. One is static and converts a short primitive value to a string. The other is the usual toString() method that converts a Short object to a string. Most of the remaining methods convert a Short to various primitive numeric types.
Hierarchy: Object-->Number(Serializable)-->Short(Comparable) Passed To: Short.compareTo() Returned By: Short.{decode(), valueOf()}
Signals that a stack overflow has occurred within the Java interpreter.
Hierarchy: Object-->Throwable(Serializable)-->Error-->VirtualMachineError-->StackOverflowError
This class is identical to the Math class, but additionally requires that its methods strictly adhere to the behavior of certain published algorithms. The methods of StrictMath are intended to operate identically, down to the very least significant bit, for all possible arguments. When strict platform-independence of floating-point results is not required, use the Math class for better performance.
The String class represents a string of characters. A String object is created by the Java compiler whenever it encounters a string in double quotes; this method of creation is typically simpler than using a constructor. Some methods of this class provide useful string-manipulation functions. length() returns the number of characters in a string. charAt() extracts a character from a string. compareTo() compares two strings, while equalsIgnoreCase() tests strings for equality, ignoring case. startsWith() and endsWith() compare the start and end of a string to a specified value. indexOf() and lastIndexOf() search forward and backward in a string for a specified character or substring. substring() returns a substring of a string. replace() creates a new copy of the string with one character replaced by another. toUpperCase() and toLowerCase() convert the case of a string. trim() strips whitespace from the start and end of a string. concat() concatenates two strings, which can also be done with the + operator. The static valueOf() methods convert various Java primitive types to strings. Note that String objects are immutable; there is no setCharAt() method to change the contents. The methods above that return a String do not modify the string they are passed, but instead return a modified copy of the string. Use a StringBuffer if you want to manipulate the contents of a string or toCharArray() to convert a string to an array of char values.
Hierarchy: Object-->String(Comparable,Serializable) Passed To: Too many methods to list. Returned By: Too many methods to list. Type Of: Too many fields to list.
This class represents a mutable string of characters that can grow or shrink as necessary. Its mutability makes it suitable for processing text in place, which is not possible with the immutable String class. Its resizability and the various methods it implements make it easier to use than a char[]. You can query the character stored at a given index with charAt() and set the character with setCharAt(). Use the various append() methods to append text to the end of the buffer. Use insert() to insert text at a specified position within the buffer. Note that arguments to append() and insert() are converted to strings as necessary before they are appended or inserted. Use toString() to convert the contents of a StringBuffer to a String object. In Java 1.2 and later, use deleteCharAt() or delete() to delete a single character or a range of characters from the buffer. Use replace() to replace a range of characters with a specified String, and use substring() to convert a portion of a StringBuffer to a String. String concatenation in Java is performed with the + operator and is implemented using the append() method of a StringBuffer. After a string is processed in a StringBuffer object, it can be efficiently converted to a String object for subsequent use. The StringBuffer.toString() method is typically implemented so that it does not copy the internal array of characters. Instead, it shares that array with the new String object, making a new copy for itself only if and when further modifications are made to the StringBuffer object.
Hierarchy: Object-->StringBuffer(Serializable) Passed To: Too many methods to list. Returned By: Too many methods to list.
Signals that the index used to access a character of a String or StringBuffer is less than zero or is too large.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->IndexOutOfBoundsException-->StringIndexOutOfBoundsException
This class defines a platform-independent interface to system facilities, including system properties and system input and output streams. All methods and variables of this class are static, and the class cannot be instantiated. Because the methods defined by this class are low-level system methods, most require special permissions and cannot be executed by untrusted code. getProperty() looks up a named property on the system-properties list, returning the optionally specified default value if no property definition is found. getProperties() returns the entire properties list. setProperties() sets a Properties object on the properties list. In Java 1.2 and later, setProperty() sets the value of a system property. The following table lists system properties that are always defined. Untrusted code may be unable to read some or all of these properties. Additional properties can be defined using the -D option when invoking the Java interpreter.
The in, out, and err fields hold the standard input, output, and error streams for the system. These fields are frequently used in calls such as System.out.println(). In Java 1.1, setIn(), setOut(), and setErr() allow these streams to be redirected. System also defines various other useful static methods. exit() causes the Java VM to exit. arraycopy() efficiently copies an array or a portion of an array into a destination array. currentTimeMillis() returns the current time in milliseconds since midnight GMT, January 1, 1970 GMT. gc() requests that the garbage collector perform a thorough garbage-collection pass, and runFinalization() requests that the garbage collector finalize all objects that are ready for finalization. Applications do not typically need to call these garbage-collection methods, but they can be useful when benchmarking code with currentTimeMillis(). identityHashCode() computes the hashcode for an object in the same way that the default Object.hashCode() method does. It does this regardless of whether or how the hashCode() method has been overridden. load() and loadLibrary() can read libraries of native code into the system. mapLibraryName() converts a system-independent library name into a system-dependent library filename. Finally, getSecurityManager() and setSecurityManager() get and set the system SecurityManager object responsible for the system security policy. See also Runtime, which defines several other methods that provide low-level access to system facilities.
This class encapsulates all information about a single thread of control running on the Java interpreter. To create a thread, you must either pass a Runnable object (i.e., an object that implements the Runnable interface by defining a run() method) to the Thread constructor or subclass Thread so that it defines its own run() method. The run() method of the Thread or of the specified Runnable object is the body of the thread. It begins executing when the start() method of the Thread object is called. The thread runs until the run() method returns. isAlive() returns true if a thread has been started, and the run() method has not yet exited. The static methods of this class operate on the currently running thread. currentThread() returns the Thread object of the currently running code. sleep() makes the current thread stop for a specified amount of time. yield() makes the current thread give up control to any other threads of equal priority that are waiting to run. The instance methods may be called by one thread to operate on a different thread. checkAccess() checks whether the running thread has permission to modify a Thread object and throws a SecurityException if it does not. join() waits for a thread to die. interrupt() wakes up a waiting or sleeping thread (with an InterruptedException) or sets an interrupted flag on a nonsleeping thread. A thread can test its own interrupted flag with the static interrupted() method or can test the flag of another thread with isInterrupted(). Calling interrupted() implicitly clears the interrupted flag, but calling isInterrupted() does not. Methods related to sleep() and interrupt() are the wait() and notify() methods defined by the Object class. Calling wait() causes the current thread to block until the object's notify() method is called by another thread. setName() sets the name of a thread, which is purely optional. setPriority() sets the priority of the thread. Higher priority threads run before lower-priority threads. Java does not specify what happens to multiple threads of equal priority; some systems perform time-slicing and share the CPU between such threads. On other systems, one compute-bound thread that does not call yield() may starve another thread of the same priority. setDaemon() sets a boolean flag that specifies whether this thread is a daemon or not. The Java VM keeps running as long as at least one non-daemon thread is running. Call getThreadGroup() to obtain the ThreadGroup of which a thread is part. In Java 1.2 and later, use setContextClassLoader() to specify the ClassLoader to be used to load any classes required by the thread. suspend(), resume(), and stop() suspend, resume, and stop a given thread, respectively, but all three methods are deprecated because they are inherently unsafe and can cause deadlock. If a thread must be stoppable, have it periodically check a flag and exit if the flag is set.
Hierarchy: Object-->Thread(Runnable) Passed To: Runtime.{addShutdownHook(), removeShutdownHook()}, SecurityManager.checkAccess(), Thread.enumerate(), ThreadGroup.{enumerate(), uncaughtException()} Returned By: Thread.currentThread(), javax.swing.text.AbstractDocument.getCurrentWriter()
Signals that a thread should terminate. This error is thrown in a thread when the Thread.stop() method is called for that thread. This is an unusual Error type that simply causes a thread to be terminated, but does not print an error message or cause the interpreter to exit. You can catch ThreadDeath errors to do any necessary cleanup for a thread, but if you do, you must rethrow the error so that the thread actually terminates.
Hierarchy: Object-->Throwable(Serializable)-->Error-->ThreadDeath
This class represents a group of threads and allows that group to be manipulated as a whole. A ThreadGroup can contain Thread objects, as well as other child ThreadGroup objects. All ThreadGroup objects are created as children of some other ThreadGroup, and thus there is a parent/child hierarchy of ThreadGroup objects. Use getParent() to obtain the parent ThreadGroup, and use activeCount(), activeGroupCount(), and the various enumerate() methods to list the child Thread and ThreadGroup objects. Most applications can simply rely on the default system thread group. System-level code and applications such as servers that need to create a large number of threads may find it convenient to create their own ThreadGroup objects, however. interrupt() interrupts all threads in the group at once. setMaxPriority() specifies the maximum priority any thread in the group can have. checkAccess() checks whether the calling thread has permission to modify the given thread group. The method throws a SecurityException if the current thread does not have access. uncaughtException() contains the code that is run when a thread terminates because of an uncaught exception or error. You can customize this method by subclassing ThreadGroup.
Passed To: SecurityManager.checkAccess(), Thread.Thread(), ThreadGroup.{enumerate(), parentOf(), ThreadGroup()} Returned By: SecurityManager.getThreadGroup(), Thread.getThreadGroup(), ThreadGroup.getParent()
This class provides a convenient way to create thread-local variables. When you declare a static field in a class, there is only one value for that field, shared by all objects of the class. When you declare a nonstatic instance field in a class, every object of the class has its own separate copy of that variable. ThreadLocal provides an option between these two extremes. If you declare a static field to hold a ThreadLocal object, that ThreadLocal holds a different value for each thread. Objects running in the same thread see the same value when they call the get() method of the ThreadLocal object. Objects running in different threads obtain different values from get(), however. The set() method sets the value held by the ThreadLocal object for the currently running thread. get() returns the value held for the currently running thread. Note that there is no way to obtain the value of the ThreadLocal object for any thread other than the one that calls get(). To understand the ThreadLocal class, you may find it helpful to think of a ThreadLocal object as a hashtable or java.util.Map that maps from Thread objects to arbitrary values. Calling set() creates an association between the current Thread (Thread.currentThread()) and the specified value. Calling get() first looks up the current thread, then uses the hashtable to look up the value associated with that current thread. If a thread calls get() for the first time without having first called set() to establish a thread-local value, get() calls the protected initialValue() method to obtain the initial value to return. The default implementation of initialValue() simply returns null, but subclasses can override this if they desire. See also InheritableThreadLocal, which allows thread-local values to be inherited from parent threads by child threads.
Subclasses: InheritableThreadLocal
This is the root class of the Java exception and error hierarchy. All exceptions and errors are subclasses of Throwable. The getMessage() method retrieves any error message associated with the exception or error. printStackTrace() prints a stack trace that shows where the exception occurred. fillInStackTrace() extends the stack trace when the exception is partially handled and then rethrown.
Hierarchy: Object-->Throwable(Serializable) Subclasses: Error, Exception Passed To: Too many methods to list. Returned By: ClassNotFoundException.getException(), ExceptionInInitializerError.getException(), Throwable.fillInStackTrace(), java.lang.reflect.InvocationTargetException.getTargetException(), java.lang.reflect.UndeclaredThrowableException.getUndeclaredThrowable(), javax.naming.NamingException.getRootCause(), javax.servlet.ServletException.getRootCause() Thrown By: java.awt.AWTEvent.finalize(), java.awt.Font.finalize(), java.awt.Frame.finalize(), java.awt.Window.finalize(), Object.finalize(), java.lang.reflect.InvocationHandler.invoke(), javax.swing.text.AbstractDocument.AbstractElement.finalize() Type Of: java.rmi.RemoteException.detail, java.rmi.activation.ActivationException.detail, javax.naming.NamingException.rootException, org.omg.CORBA.portable.UnknownException.originalEx
Signals that an unknown error has occurred at the level of the Java Virtual Machine.
Hierarchy: Object-->Throwable(Serializable)-->Error-->VirtualMachineError-->UnknownError
Signals that Java cannot satisfy all the links in a class that it has loaded.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->UnsatisfiedLinkError
Every Java class file contains a version number that specifies the version of the class file format. This error is thrown when the Java Virtual Machine attempts to read a class file with a version number it does not support.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->ClassFormatError-->UnsupportedClassVersionError
Signals that a method you have called is not supported, and its implementation does not do anything (except throw this exception). This exception is used most often by the Java collection framework of java.util. Immutable or unmodifiable collections throw this exception when a modification method, such as add() or delete(), is called.
Hierarchy: Object-->Throwable(Serializable)-->Exception-->RuntimeException-->UnsupportedOperationException
Signals that a class has not passed the byte-code verification procedures.
Hierarchy: Object-->Throwable(Serializable)-->Error-->LinkageError-->VerifyError
An abstract error type that serves as superclass for a group of errors related to the Java Virtual Machine. See InternalError, UnknownError, OutOfMemoryError, and StackOverflowError.
Hierarchy: Object-->Throwable(Serializable)-->Error-->VirtualMachineError Subclasses: InternalError, OutOfMemoryError, StackOverflowError, UnknownError
The Void class cannot be instantiated and serves merely as a placeholder for its static TYPE field, which is a Class object constant that represents the void type.
Copyright © 2001 O'Reilly & Associates. All rights reserved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|