public static class

SunHints.Key

extends RenderingHints.Key
java.lang.Object
   ↳ java.awt.RenderingHints.Key
     ↳ sun.awt.SunHints.Key
Known Direct Subclasses

Class Overview

Defines the type of all keys used to control various aspects of the rendering and imaging pipelines. Instances of this class are immutable and unique which means that tests for matches can be made using the == operator instead of the more expensive equals() method.

Summary

Public Constructors
SunHints.Key(int privatekey, String description)
Construct a key using the indicated private key.
Public Methods
final int getIndex()
Returns the numeric index associated with this Key.
boolean isCompatibleValue(Object val)
Returns true if the specified object is a valid value for this Key.
final String toString()
Returns a string representation of the Key.
[Expand]
Inherited Methods
From class java.awt.RenderingHints.Key
From class java.lang.Object

Public Constructors

public SunHints.Key (int privatekey, String description)

Construct a key using the indicated private key. Each subclass of Key maintains its own unique domain of integer keys. No two objects with the same integer key and of the same specific subclass can be constructed. An exception will be thrown if an attempt is made to construct another object of a given class with the same integer key as a pre-existing instance of that subclass of Key.

Public Methods

public final int getIndex ()

Returns the numeric index associated with this Key. This is useful for use in switch statements and quick lookups of the setting of a particular key.

public boolean isCompatibleValue (Object val)

Returns true if the specified object is a valid value for this Key.

Parameters
val the Object to test for validity
Returns
  • true if val is valid; false otherwise.

public final String toString ()

Returns a string representation of the Key.

Returns
  • a string representation of the object.