Class CardAttributeMap

java.lang.Object
java.util.AbstractMap<K,​V>
java.util.EnumMap<K,​V>
net.demilich.metastone.game.cards.BaseMap<Attribute,​java.lang.Object>
net.demilich.metastone.game.cards.AttributeMap
net.demilich.metastone.game.cards.CardAttributeMap
All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable, java.io.Serializable, java.lang.Cloneable, java.util.Map<Attribute,​java.lang.Object>, HasEntrySet<Attribute,​java.lang.Object>

public final class CardAttributeMap
extends AttributeMap
implements java.lang.Cloneable, com.fasterxml.jackson.databind.JsonSerializable, java.io.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:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.util.AbstractMap

    java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>

    Nested classes/interfaces inherited from interface net.demilich.metastone.game.cards.desc.HasEntrySet

    HasEntrySet.BfsEnum, HasEntrySet.BfsNode<T extends java.lang.Enum,​V>

    Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

    com.fasterxml.jackson.databind.JsonSerializable.Base

    Nested classes/interfaces inherited from interface java.util.Map

    java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
  • Constructor Summary

    Constructors 
    Constructor Description
    CardAttributeMap​(Card card)  
  • Method Summary

    Modifier and Type Method Description
    CardAttributeMap clone()  
    boolean containsKey​(java.lang.Object key)  
    java.lang.Object get​(java.lang.Object key)  
    Card 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 setCard​(Card card)  
    java.util.Set<java.util.Map.Entry<Attribute,​java.lang.Object>> unsafeEntrySet()  
    java.util.Set<Attribute> unsafeKeySet()  

    Methods inherited from class net.demilich.metastone.game.cards.AttributeMap

    entrySet, put

    Methods inherited from class net.demilich.metastone.game.cards.BaseMap

    toString

    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

  • Method Details

    • unsafeKeySet

      public java.util.Set<Attribute> unsafeKeySet()
      Overrides:
      unsafeKeySet in class AttributeMap
    • get

      public java.lang.Object get​(java.lang.Object key)
      Specified by:
      get in interface java.util.Map<Attribute,​java.lang.Object>
      Overrides:
      get in class java.util.EnumMap<Attribute,​java.lang.Object>
    • containsKey

      public boolean containsKey​(java.lang.Object key)
      Specified by:
      containsKey in interface java.util.Map<Attribute,​java.lang.Object>
      Overrides:
      containsKey in class java.util.EnumMap<Attribute,​java.lang.Object>
    • getCard

      public Card getCard()
    • setCard

      public void setCard​(Card card)
    • clone

      public CardAttributeMap clone()
      Overrides:
      clone in class AttributeMap
    • unsafeEntrySet

      public java.util.Set<java.util.Map.Entry<Attribute,​java.lang.Object>> unsafeEntrySet()
    • serialize

      public void serialize​(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws java.io.IOException
      Specified by:
      serialize in interface com.fasterxml.jackson.databind.JsonSerializable
      Throws:
      java.io.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 java.io.IOException
      Specified by:
      serializeWithType in interface com.fasterxml.jackson.databind.JsonSerializable
      Throws:
      java.io.IOException