public enum IsImmutable extends Enum<IsImmutable>
Enum Constant and Description |
---|
COULD_NOT_ANALYSE
Instances can be any of
IMMUTABLE /EFFECTIVELY_IMMUTABLE /NOT_IMMUTABLE , however, an
internal error has occurred during analysis, and no result is meaningful. |
EFFECTIVELY_IMMUTABLE
Instances are only immutable when safely published.
|
IMMUTABLE
Instances are perfectly immutable, can be safely published without extra synchronisation.
|
NOT_IMMUTABLE
Instances are not immutable, do not cache and/or share instances, do not publish to multiple threads, do not use
as keys in
HashMap s. |
Modifier and Type | Method and Description |
---|---|
static IsImmutable |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IsImmutable[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IsImmutable IMMUTABLE
public static final IsImmutable EFFECTIVELY_IMMUTABLE
public static final IsImmutable NOT_IMMUTABLE
HashMap
s.public static final IsImmutable COULD_NOT_ANALYSE
IMMUTABLE
/EFFECTIVELY_IMMUTABLE
/NOT_IMMUTABLE
, however, an
internal error has occurred during analysis, and no result is meaningful.public static IsImmutable[] values()
for (IsImmutable c : IsImmutable.values()) System.out.println(c);
public static IsImmutable valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2008–2022 Graham Allan. All rights reserved.