Class UnitDatabase.PrefixedUnitMap.PrefixedUnitEntrySet.PrefixedUnitEntry

  • All Implemented Interfaces:
    java.util.Map.Entry<java.lang.String,​Unit>
    Enclosing class:
    UnitDatabase.PrefixedUnitMap.PrefixedUnitEntrySet

    private static final class UnitDatabase.PrefixedUnitMap.PrefixedUnitEntrySet.PrefixedUnitEntry
    extends java.lang.Object
    implements java.util.Map.Entry<java.lang.String,​Unit>
    The entry for this set.
    Since:
    2019-04-14, v0.2.0
    Author:
    Adrien Hopkins
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String key  
      private Unit value  
    • Constructor Summary

      Constructors 
      Constructor Description
      PrefixedUnitEntry​(java.lang.String key, Unit value)
      Creates the PrefixedUnitEntry.
    • Field Detail

      • key

        private final java.lang.String key
      • value

        private final Unit value
    • Constructor Detail

      • PrefixedUnitEntry

        public PrefixedUnitEntry​(java.lang.String key,
                                 Unit value)
        Creates the PrefixedUnitEntry.
        Parameters:
        key - key
        value - value
        Since:
        2019-04-14, v0.2.0
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map.Entry<java.lang.String,​Unit>
        Overrides:
        equals in class java.lang.Object
        Since:
        2019-05-03
      • getKey

        public java.lang.String getKey()
        Specified by:
        getKey in interface java.util.Map.Entry<java.lang.String,​Unit>
      • getValue

        public Unit getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<java.lang.String,​Unit>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map.Entry<java.lang.String,​Unit>
        Overrides:
        hashCode in class java.lang.Object
        Since:
        2019-05-03
      • setValue

        public Unit setValue​(Unit value)
        Specified by:
        setValue in interface java.util.Map.Entry<java.lang.String,​Unit>
      • toString

        public java.lang.String toString()
        Returns a string representation of the entry. The format of the string is the string representation of the key, then the equals (=) character, then the string representation of the value.
        Overrides:
        toString in class java.lang.Object
        Since:
        2019-05-03