Class RestrictedCollections.RestrictedEntrySet.RestrictedEntry

    • Constructor Detail

      • RestrictedEntry

        public RestrictedEntry​(Map.Entry entry)
        Constructor.
        Parameters:
        entry - the Entry to wrap
    • Method Detail

      • getKey

        public Object getKey()
        Returns the key corresponding to this entry.
        Specified by:
        getKey in interface Map.Entry
        Returns:
        the key corresponding to this entry
      • getValue

        public Object getValue()
        Returns the value corresponding to this entry.
        Specified by:
        getValue in interface Map.Entry
        Returns:
        the value corresponding to this entry
      • setValue

        public Object setValue​(Object value)
        Replaces the value corresponding to this entry with the specified value.
        Specified by:
        setValue in interface Map.Entry
        Parameters:
        value - new value to be stored in this entry
        Returns:
        old value corresponding to the entry
        Throws:
        ClassCastException - if the class of the specified value prevents it from being stored in the backing map
      • equals

        public boolean equals​(Object o)
        Compares the specified object with this entry for equality.
        Specified by:
        equals in interface Map.Entry
        Overrides:
        equals in class Object
        Parameters:
        o - object to be compared for equality with this map entry
        Returns:
        true if the specified object is equal to this map entry
      • hashCode

        public int hashCode()
        Returns the hash code value for this map entry.
        Specified by:
        hashCode in interface Map.Entry
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this map entry
      • toString

        public String toString()
        Return a String description for this Entry.
        Overrides:
        toString in class Object
        Returns:
        a String description of the Entry