Package Summary Overview Summary

Module java.base
Package java.lang.runtime

# Class ExactnessMethods

java.lang.Object
java.lang.runtime.ExactnessMethods

public class ExactnessMethods extends Object
Exactness methods to test whether a conversion between types would be exact when not enough static information is present. These methods may be used, for example, by Java compiler implementations to implement checks for instanceof and pattern matching runtime implementations.

Since:
  21

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `byte_char (byte n)`
  Exactness method from byte to char
  `static boolean`
  `char_byte (char n)`
  Exactness method from char to byte
  `static boolean`
  `char_short (char n)`
  Exactness method from char to short
  `static boolean`
  `double_byte (double n)`
  Exactness method from double to byte
  `static boolean`
  `double_char (double n)`
  Exactness method from double to char
  `static boolean`
  `double_float (double n)`
  Exactness method from double to float
  `static boolean`
  `double_int (double n)`
  Exactness method from double to int
  `static boolean`
  `double_long (double n)`
  Exactness method from double to long
  `static boolean`
  `double_short (double n)`
  Exactness method from double to short
  `static boolean`
  `float_byte (float n)`
  Exactness method from float to byte
  `static boolean`
  `float_char (float n)`
  Exactness method from float to char
  `static boolean`
  `float_int (float n)`
  Exactness method from float to int
  `static boolean`
  `float_long (float n)`
  Exactness method from float to long
  `static boolean`
  `float_short (float n)`
  Exactness method from float to short
  `static boolean`
  `int_byte (int n)`
  Exactness method from int to byte
  `static boolean`
  `int_char (int n)`
  Exactness method from int to char
  `static boolean`
  `int_float (int n)`
  Exactness method from int to float
  `static boolean`
  `int_short (int n)`
  Exactness method from int to short
  `static boolean`
  `long_byte (long n)`
  Exactness method from long to byte
  `static boolean`
  `long_char (long n)`
  Exactness method from long to char
  `static boolean`
  `long_double (long n)`
  Exactness method from long to double
  `static boolean`
  `long_float (long n)`
  Exactness method from long to float
  `static boolean`
  `long_int (long n)`
  Exactness method from long to int
  `static boolean`
  `long_short (long n)`
  Exactness method from long to short
  `static boolean`
  `short_byte (short n)`
  Exactness method from short to byte
  `static boolean`
  `short_char (short n)`
  Exactness method from short to char

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### byte_char

    public static boolean byte_char (byte n)
    Exactness method from byte to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### short_byte

    public static boolean short_byte (short n)
    Exactness method from short to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### short_char

    public static boolean short_char (short n)
    Exactness method from short to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### char_byte

    public static boolean char_byte (char n)
    Exactness method from char to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### char_short

    public static boolean char_short (char n)
    Exactness method from char to short
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### int_byte

    public static boolean int_byte (int n)
    Exactness method from int to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### int_short

    public static boolean int_short (int n)
    Exactness method from int to short
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### int_char

    public static boolean int_char (int n)
    Exactness method from int to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### int_float

    public static boolean int_float (int n)
    Exactness method from int to float
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_byte

    public static boolean long_byte (long n)
    Exactness method from long to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_short

    public static boolean long_short (long n)
    Exactness method from long to short
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_char

    public static boolean long_char (long n)
    Exactness method from long to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_int

    public static boolean long_int (long n)
    Exactness method from long to int
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_float

    public static boolean long_float (long n)
    Exactness method from long to float
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### long_double

    public static boolean long_double (long n)
    Exactness method from long to double
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### float_byte

    public static boolean float_byte (float n)
    Exactness method from float to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### float_short

    public static boolean float_short (float n)
    Exactness method from float to short
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### float_char

    public static boolean float_char (float n)
    Exactness method from float to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### float_int

    public static boolean float_int (float n)
    Exactness method from float to int
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### float_long

    public static boolean float_long (float n)
    Exactness method from float to long
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_byte

    public static boolean double_byte (double n)
    Exactness method from double to byte
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_short

    public static boolean double_short (double n)
    Exactness method from double to short
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_char

    public static boolean double_char (double n)
    Exactness method from double to char
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_int

    public static boolean double_int (double n)
    Exactness method from double to int
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_long

    public static boolean double_long (double n)
    Exactness method from double to long
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type

  - ### double_float

    public static boolean double_float (double n)
    Exactness method from double to float
    Parameters:
      `n` - value
    Returns:
      true if the passed value can be converted exactly to the target type