Determine whether or not this lock set contains any locked values which
are method return values.

@param factory
the ValueNumberFactory that produced the lock values
320820
public boolean containsReturnValue(ValueNumberFactory factory) {
        for (int i = 0; i + 1 < array.length; i += 2) {
            int valueNumber = array[i];
            if (valueNumber < 0) {
                break;
            }
            int lockCount = array[i + 1];
            if (lockCount > 0 && factory.forNumber(valueNumber).hasFlag(ValueNumber.RETURN_VALUE)) {
                return true;
            }
        }
        return false;
    }
454073
public boolean containsValue(Object value) {
        if (value == null) {
            value = new Null();
        }

        Entry tab[] = mTable;
        
        for (int i = tab.length ; i-- > 0 ;) {
            for (Entry e = tab[i], prev = null; e != null; e = e.mNext) {
                Object entryValue = e.getValue();

                if (entryValue == null) {
                    // Clean up after a cleared Reference.
                    mModCount++;
                    if (prev != null) {
                        prev.mNext = e.mNext;
                    }
                    else {
                        tab[i] = e.mNext;
                    }
                    mCount--;
                }
                else if (value.equals(entryValue)) {
                    return true;
                }
                else {
                    prev = e;
                }
            }
        }

        return false;
    }
1256541
public void containsEntry(@NullableDecl Object key, @NullableDecl Object value) {
    Entry<Object, Object> entry = Maps.immutableEntry(key, value);
    if (!actual().entrySet().contains(entry)) {
      List<Object> keyList = Lists.newArrayList(key);
      List<Object> valueList = Lists.newArrayList(value);
      if (hasMatchingToStringPair(actual().keySet(), keyList)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s (%s)>. However, it does contain keys "
                        + "<%s>.",
                    actualAsString(),
                    entry,
                    objectToTypeName(entry),
                    countDuplicatesAndAddTypeInfo(
                        retainMatchingToString(actual().keySet(), keyList /* itemsToCheck */)))));
      } else if (hasMatchingToStringPair(actual().values(), valueList)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s (%s)>. However, it does contain values "
                        + "<%s>.",
                    actualAsString(),
                    entry,
                    objectToTypeName(entry),
                    countDuplicatesAndAddTypeInfo(
                        retainMatchingToString(actual().values(), valueList /* itemsToCheck */)))));
      } else if (actual().containsKey(key)) {
        Object actualValue = actual().get(key);
        /*
         * In the case of a null expected or actual value, clarify that the key *is* present and
         * *is* expected to be present. That is, get() isn't returning null to indicate that the key
         * is missing, and the user isn't making an assertion that the key is missing.
         */
        StandardSubjectBuilder check = check("get(%s)", key);
        if (value == null || actualValue == null) {
          check = check.withMessage("key is present but with a different value");
        }
        // See the comment on IterableSubject's use of failEqualityCheckForEqualsWithoutDescription.
        check.that(actualValue).failEqualityCheckForEqualsWithoutDescription(value);
      } else if (actual().containsValue(value)) {
        Set<Object> keys = new LinkedHashSet<>();
        for (Entry<?, ?> actualEntry : actual().entrySet()) {
          if (Objects.equal(actualEntry.getValue(), value)) {
            keys.add(actualEntry.getKey());
          }
        }
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s>. "
                        + "However, the following keys are mapped to <%s>: %s",
                    actualAsString(), entry, value, keys)));
      } else {
        failWithActual("expected to contain entry", entry);
      }
    }
  }
669838
def __get_stored_instances(self, factory_name):
        # type: (str) -> List[StoredInstance]
        
        with self.__instances_lock:
            return [
                stored_instance
                for stored_instance in self.__instances.values()
                if stored_instance.factory_name == factory_name
            ]
228924
private boolean isLocked(Class entityType, String entityKey, Integer lockType)
            throws LockingException {
        IEntityLock[] locks = retrieveLocks(entityType, entityKey, lockType);
        return locks.length > 0;
    }
858582
private static <T> List<TableFactory> filterByFactoryClass(
		Class<T> factoryClass,
		Map<String, String> properties,
		List<TableFactory> foundFactories) {

		List<TableFactory> classFactories = foundFactories.stream()
			.filter(p -> factoryClass.isAssignableFrom(p.getClass()))
			.collect(Collectors.toList());

		if (classFactories.isEmpty()) {
			throw new NoMatchingTableFactoryException(
				String.format("No factory implements '%s'.", factoryClass.getCanonicalName()),
				factoryClass,
				foundFactories,
				properties);
		}

		return classFactories;
	}
10377
public JdbcMapperFactory getterFactory(final GetterFactory<ResultSet, JdbcColumnKey> getterFactory) {
		return addGetterFactory(new ContextualGetterFactoryAdapter<ResultSet, JdbcColumnKey>(getterFactory));
	}
216501
public final void setEntryFactory(Callback<CreateEntryParameter, Entry<?>> factory) {
        Objects.requireNonNull(factory);
        entryFactoryProperty().set(factory);
    }
1309655
function(factory, options) {

			if(typeof options != "object") {
				options = {};
			}

			factory.autoStart = options.autoStart ? true : false;

			if(options.autoStart) {
				this.shouldAutoIncrement = true;
			}

			factory.increment = function() {
				factory.countdown = false;
				factory.setTime(factory.getTime().getTimeSeconds() + 1);
			};

			factory.decrement = function() {
				factory.countdown = true;
				var time = factory.getTime().getTimeSeconds();
				if(time > 0) {
					factory.setTime(time - 1);
				}
			};

			factory.setValue = function(digits) {
				factory.setTime(digits);
			};

			factory.setCounter = function(digits) {
				factory.setTime(digits);
			};

			this.base(factory, options);
		}
491437
public synchronized boolean stillMyValues() throws IOException, FileNotFoundException {
        for (;;) {
            try {
                lock();
                getValues();
                unlock();
                if (containsPortInfo) {
                    if (serverPort == myServerPort &&
                        serverCookie == myServerCookie) {
                        // Everything is ok.
                        return true;
                    }
                    // Someone has overwritten the port file.
                    // Probably another javac server, lets quit.
                    return false;
                }
                // Something else is wrong with the portfile. Lets quit.
                return false;
            } catch (FileLockInterruptionException e) {
                continue;
            }
            catch (ClosedChannelException e) {
                // The channel has been closed since sjavac is exiting.
                return false;
            }
        }
    }
583429
public synchronized static void initGlobal(ContextFactory factory)
    {
        if (factory == null) {
            throw new IllegalArgumentException();
        }
        if (hasCustomGlobal) {
            throw new IllegalStateException();
        }
        hasCustomGlobal = true;
        global = factory;
    }
1134439
public final void setEntryViewFactory(
            Callback<Entry<?>, AllDayEntryView> factory) {
        requireNonNull(factory);
        entryViewFactoryProperty().set(factory);
    }
1358679
@Override
  public final IFactorySimple<?> lazyGet(//NOPMD
    // Rule:DoubleCheckedLocking isn't true see in beige-common:
    // org.beigesoft.test.DoubleCkeckLockingWrApTest
    final Map<String, Object> pAddParam,
      final Class<?> pBeanClass) throws Exception {
    IFactorySimple<?> factory =
      this.factoriesMap.get(pBeanClass);
    if (factory == null) {
      // locking:
      synchronized (this.factoriesMap) {
        // make sure again whether it's null after locking:
        factory = this.factoriesMap.get(pBeanClass);
        if (AccountingEntries.class == pBeanClass) {
          factory = createPutFactoryAccountingEntries();
        } else if (IDoc.class.isAssignableFrom(pBeanClass)) {
          factory = createPutFactoryAccDoc(pBeanClass);
        } else if (IPersistableBase.class.isAssignableFrom(pBeanClass)) {
          factory = createPutFactoryPersistableBase(pBeanClass);
        } else {
          factory = createPutFactorySimple(pBeanClass);
        }
      }
    }
    return factory;
  }
774002
@Override
    public boolean containsValue(Object value) {
        for (V v : values()) {
            if (v.equals(value)) {
                return true;
            }
        }
        return false;
    }
1274229
public void set(BridgeFactory factory) {
        if (factory.getNearType() != nearType) {
            throw new IllegalArgumentException("Type mismatch: " + nearType + ": " + factory.getNearType());
        }
        factorySetting.set(factory);
    }
146249
public final void setEntryViewFactory(
			Callback<Entry<?>, DayEntryView> factory) {
		requireNonNull(factory);
		entryViewFactoryProperty().set(factory);
	}
563338
public Object get(String name, ObjectFactory<?> factory) {
		ThreadScopeContext context = ThreadScopeContextHolder.getContext();

		Object result = context.getBean(name);
		if (null == result) {
			result = factory.getObject();
			context.setBean(name, result);
		}
		return result;
	}