/** * Subclasses should override this method. */ @Override @SuppressWarnings(value = "unchecked") public void testConstructors() { fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testConstructors"); Map.Entry<K, V> entry = new UnmodifiableMapEntry<K, V>(((K)(key)) , ((V)(value))); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2575,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2577,entry,2576,entry.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2578,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2580,entry,2579,entry.getValue()); final KeyValue<K, V> pair = new DefaultKeyValue<K, V>(((K)(key)) , ((V)(value))); entry = new UnmodifiableMapEntry<K, V>(pair); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2581,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2583,entry,2582,entry.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2584,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2586,entry,2585,entry.getValue()); final Map.Entry<K, V> entry2 = new UnmodifiableMapEntry<K, V>(entry); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2587,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2589,entry2,2588,entry2.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2590,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2592,entry2,2591,entry2.getValue()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2593,(entry instanceof org.apache.commons.collections4.Unmodifiable)); fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread()); }
/** * Subclasses should override this method. */ @SuppressWarnings(value = "unchecked") public void testConstructors_literalMutation928() { fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testConstructors_literalMutation928"); Map.Entry<K, V> entry = new UnmodifiableMapEntry<K, V>(((K)(key)) , ((V)(value))); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2575,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2577,entry,2576,entry.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2578,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2580,entry,2579,entry.getValue()); final KeyValue<K, V> pair = new DefaultKeyValue<K, V>(((K)(key)) , ((V)(value))); entry = new UnmodifiableMapEntry<K, V>(pair); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2581,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2583,entry,2582,entry.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2584,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2586,entry,2585,entry.getValue()); final Map.Entry<K, V> entry2 = new UnmodifiableMapEntry<K, V>(entry); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2587,key); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2589,entry2,2588,entry2.getKey()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2590,value); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2592,entry2,2591,entry2.getValue()); fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),2593,(entry instanceof org.apache.commons.collections4.Unmodifiable)); fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread()); }
/************************************************************************ * Determines if a given syllogism for an equivalence type is valid. * * @param memeKey * @param equivalence * @param memeValue * @return result if known, otherwise optional.empty(). ***********************************************************************/ public Optional<Boolean> interrogate(Term memeKey, Copula equivalence, Term memeValue) { Collection<KeyValue<Copula, Term>> memeRelations = (Collection<KeyValue<Copula, Term>>) memeAssociations.get(memeKey); if (memeRelations == null || memeRelations.isEmpty()) { return Optional.empty(); } Optional<KeyValue<Copula, Term>> result = memeRelations .parallelStream() .findFirst() .filter((KeyValue<Copula, Term> kv) -> { if (kv.getKey().equals(equivalence) && kv.getValue().equals(memeValue)) { return true; } else { Optional<Boolean> result1 = interrogate(kv.getValue(), equivalence, memeValue); return result1.isPresent(); } }); if (result.isPresent()) { return Optional.of(equivalence.getTruthEquivalency()); } return Optional.empty(); }
/** * Constructor specifying the key and value as a <code>KeyValue</code>. * * @param keyValue the key value pair to use */ public SingletonMap(final KeyValue<K, V> keyValue) { super(); this.key = keyValue.getKey(); this.value = keyValue.getValue(); }
/** * Constructs a new entry from the specified <code>KeyValue</code>. * * @param pair the pair to copy, must not be null * @throws NullPointerException if the entry is null */ public DefaultMapEntry(final KeyValue<? extends K, ? extends V> pair) { super(pair.getKey(), pair.getValue()); }
/** * Constructs a new entry from the specified <code>KeyValue</code>. * * @param pair the pair to copy, must not be null * @throws NullPointerException if the entry is null */ public UnmodifiableMapEntry(final KeyValue<? extends K, ? extends V> pair) { super(pair.getKey(), pair.getValue()); }
/** * Constructs a new pair from the specified <code>KeyValue</code>. * * @param pair the pair to copy, must not be null * @throws NullPointerException if the entry is null */ public DefaultKeyValue(final KeyValue<? extends K, ? extends V> pair) { super(pair.getKey(), pair.getValue()); }