APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.css.media

public final Class MediaQueryCache

extends Object
Class Inheritance
Imports
java.lang.ref.WeakReference, java.util.Map, .WeakHashMap

A cache for MediaQuery instances that is used to deduplicate media queries. More specifically, this cache ensures that only a single instance of any distinct media query exists at any point in time. This cache holds weak references, ensuring that media queries that are no longer in use will be eligible for garbage collection.

Field Summary

Modifier and TypeField and Description
private static final Map<MediaQuery, WeakReference<MediaQuery>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static synchronized <T extends MediaQuery> T
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CACHEback to summary
private static final Map<MediaQuery, WeakReference<MediaQuery>> CACHE

Constructor Detail

MediaQueryCacheback to summary
private MediaQueryCache()

Method Detail

getCachedMediaQueryback to summary
public static synchronized <T extends MediaQuery> T getCachedMediaQuery(T query)
Annotations
@SuppressWarnings:unchecked