public final class DefaultsList extends Object
Constructor and Description |
---|
DefaultsList()
Creates a
DefaultsList . |
Modifier and Type | Method and Description |
---|---|
void |
add(Object key,
Object value)
Adds a key/value pair to the defaults list.
|
void |
add(Object key,
Object value,
boolean enableChecking)
Adds a key/value pair to the defaults list.
|
private static <T> T |
asUIResource(T value,
String message) |
Object[] |
toArray()
Gets a copy of this list as an array.
|
public DefaultsList()
DefaultsList
.public void add(Object key, Object value)
add(Object, Object, boolean)
with enableChecking
set to
true
.key
- the key that will be used to query UIDefaults
value
- the value associated with the keyNullPointerException
- if key
is null
IllegalArgumentException
- if value
is a type that should be a
UIResource
but is not. For instance, passing in a
Border
that is not a UIResource
will
cause an exception. This checking must be enabled.public void add(Object key, Object value, boolean enableChecking)
null
value is treated specially. A null
-value pair is never added to
the list and, furthermore, if a key/value pair exists in this list with
the same key as the newly added one, it is removed.key
- the key that will be used to query UIDefaults
value
- the value associated with the keyenableChecking
- if true
then the value is checked to ensure that
it is a UIResource
, if appropriateNullPointerException
- if key
is null
IllegalArgumentException
- if value
is a type that should be a
UIResource
but is not. For instance, passing in a
Border
that is not a UIResource
will
cause an exception. This checking must be enabled.private static <T> T asUIResource(T value, String message)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses