public boolean contains()

in base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java [554:569]


        public boolean contains(Object obj) {
            if (!(obj instanceof Map.Entry)) {
                return false;
            }

            /* The contains method is expecting the search type to be of the
             * same type stored. This contract is enforced as a precondition.
             * So we can safely suppress type safety warnings below. */
            @SuppressWarnings("unchecked")
            Map.Entry<String, Object> entry = (Map.Entry<String, Object>) obj;
            Entry<String, Object> actual = ContextBase.this.entry(entry.getKey());
            if (actual != null) {
                return actual.equals(entry);
            }
            return false;
        }