public virtual Object getValue()
            {
                HashEntry current = currentEntry();

                if (current == null)
                {
                    throw new java.lang.IllegalStateException(AbstractHashedMap.GETVALUE_INVALID);
                }
                return(current.getValue());
            }
Beispiel #2
0
        /**
         * Gets the value mapped to the key specified.
         *
         * @param key  the key
         * @return the mapped value, null if no match
         */
        public override Object get(Object key)
        {
            purgeBeforeRead();
            HashEntry entry = getEntry(key);

            if (entry == null)
            {
                return(null);
            }
            return(entry.getValue());
        }
Beispiel #3
0
        /**
         * Checks whether the map contains the specified key.
         *
         * @param key  the key to search for
         * @return true if the map contains the key
         */
        public override bool containsKey(Object key)
        {
            purgeBeforeRead();
            HashEntry entry = getEntry(key);

            if (entry == null)
            {
                return(false);
            }
            return(entry.getValue() != null);
        }