Class CardAttributeMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.EnumMap<K,V>
net.demilich.metastone.game.cards.BaseMap<Attribute,Object>
net.demilich.metastone.game.cards.AttributeMap
net.demilich.metastone.game.cards.CardAttributeMap
- All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable
,Serializable
,Cloneable
,Map<Attribute,
,Object> HasEntrySet<Attribute,
Object>
public final class CardAttributeMap
extends AttributeMap
implements Cloneable, com.fasterxml.jackson.databind.JsonSerializable, Serializable
A hashmap that can contain "overrides" to a
CardDesc
. This allows cards to assume other identities while
retaining their enchantments by changing their Attribute.CARD_ID
or Attribute.AURA_CARD_ID
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> Nested classes/interfaces inherited from interface net.demilich.metastone.game.cards.desc.HasEntrySet
HasEntrySet.BfsEnum, HasEntrySet.BfsNode<T extends Enum,
V> Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable
com.fasterxml.jackson.databind.JsonSerializable.Base
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
containsKey
(Object key) getCard()
void
serialize
(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) void
serializeWithType
(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) void
Methods inherited from class net.demilich.metastone.game.cards.AttributeMap
entrySet, put
Methods inherited from class java.util.EnumMap
clear, containsValue, equals, hashCode, keySet, putAll, remove, size, values
Methods inherited from class java.util.AbstractMap
isEmpty
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.demilich.metastone.game.cards.desc.HasEntrySet
bfs
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CardAttributeMap
-
-
Method Details
-
unsafeKeySet
- Overrides:
unsafeKeySet
in classAttributeMap
-
get
-
containsKey
- Specified by:
containsKey
in interfaceMap<Attribute,
Object> - Overrides:
containsKey
in classEnumMap<Attribute,
Object>
-
getCard
-
setCard
-
clone
- Overrides:
clone
in classAttributeMap
-
serialize
public void serialize(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException - Specified by:
serialize
in interfacecom.fasterxml.jackson.databind.JsonSerializable
- Throws:
IOException
-
serializeWithType
public void serializeWithType(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException - Specified by:
serializeWithType
in interfacecom.fasterxml.jackson.databind.JsonSerializable
- Throws:
IOException
-