/*
(non-Javadoc)
@see net.ossindex.version.IVersionRange#contains(net.ossindex.version.IVersion)
17587
@Override
  public boolean contains(IVersion version)
  {
    // This will match both SemanticVersion and FlexibleSemanticVersion
    if (version instanceof SemanticVersion) {
      return expression.interpret(((SemanticVersion) version).getVersionImpl());
    }
    throw new IllegalArgumentException("Semantic ranges expect semantic versions");
  }
837937
@Override
    public boolean contains(IAtomContainer ring) {
        for (int i = 0; i < getAtomContainerCount(); i++) {
            if (ring == getAtomContainer(i)) {
                return true;
            }
        }
        return false;
    }
1070981
public static boolean contains(Range range, Range subrange) {
        return range.getMinimum().doubleValue() <= subrange.getMinimum().doubleValue()
                && range.getMaximum().doubleValue() >= subrange.getMaximum().doubleValue();
        
    }
265153
@Override
    public boolean containsWithinBounds(Object value) {
        if (value instanceof Comparable) {
            final int result = compareTo(from, (Comparable) value);
            return result == 0 || result < 0 && compareTo(to, (Comparable) value) >= 0;
        }
        return contains(value);
    }
1036324
public static boolean contains(Iterator<String> iterator, String value) {
        if (iterator == null || value == null) {
            return false;
        }
        while (iterator.hasNext()) {
            if (value.equals(iterator.next())) {
                return true;
            }
        }
        return false;
    }
656249
@Override
    public boolean contains(ChronoElement<?> element) {

        if ((element != null) && (this.map != null)) {
            return this.map.containsKey(element);
        }

        return false;

    }
244542
public boolean contains(final char ch) {
        for (final CharRange range : set) {
            if (range.contains(ch)) {
                return true;
            }
        }
        return false;
    }
171039
public boolean contains( VersionID m )
    {
        for ( Object _versionId : _versionIds )
        {
            VersionID vi = (VersionID) _versionId;
            boolean check = vi.match( m );
            if ( check )
            {
                return true;
            }
        }
        return false;
    }
140652
public boolean contains (Object value)
    {
        for (int ii = 0, nn = size(); ii < nn; ii++) {
            if (ObjectUtil.equals(value, _list[ii])) {
                return true;
            }
        }
        return false;
    }
1097984
public static <T> Predicate<T> contains(final Iterable<T> iterable) {
        return new Predicate<T>() {
            @Override
            public boolean test(final T testValue) {
                return Iterables.contains(iterable, testValue);
            }
        };
    }
1159101
public boolean containsRange(final Range<T> other) {
        if (other == null) {
            return false;
        }

        return (other.lowerEndpoint.isClosed ? contains(other.lowerEndpoint.value) : lowerEndpoint.value.compareTo(other.lowerEndpoint.value) <= 0)
                && (other.upperEndpoint.isClosed ? contains(other.upperEndpoint.value) : upperEndpoint.value.compareTo(other.upperEndpoint.value) >= 0);
    }
1082629
@Override
    public boolean containsWithinBounds(Object value) {
        final int result = compareTo(from, value);
        return result == 0 || result < 0 && compareTo(to, value) >= 0;
    }
237081
@SuppressWarnings("unchecked")
  public boolean contains(final Object key) {
    // validate key
    if (key == null) {
      throw new IllegalArgumentException("Null element is not supported.");
    }
    // find element
    final int hashCode = ((T)key).hashCode();
    final int index = getIndex(hashCode);
    return containsElem(index, (T) key, hashCode);
  }
844187
@Override
  public boolean contains(final int x) {
    final short hb = highbits(x);
    int index = highLowContainer.getContainerIndex(hb);
    return index >= 0
        && highLowContainer.containsForContainerAtIndex(index, lowbits(x));
  }
913520
public <V> boolean contains(IndexDefinition<T, V> indexDefinition, V value) {
    FieldIndex<T, V> index = (FieldIndex<T, V>) mIndices.get(indexDefinition);
    if (index == null) {
      throw new IllegalStateException("the given index isn't defined for this IndexedSet");
    }
    return index.containsField(value);
  }
183340
@Override
    public boolean contains(final ENTRY entry) throws CouldNotPerformException {
        if (entry == null) {
            throw new NotAvailableException("entry");
        }
        return contains(entry.getId());
    }
444894
@Override
    public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException {

        String groupContainerName = group.getLocalKey();
        String groupMemberName = member.getKey();

        if (!validKey(groupContainerName) || !validKey(groupMemberName)) {
            return false;
        }

        GcHasMember gcHasMember = new GcHasMember();
        gcHasMember.assignGroupName(groupContainerName);
        gcHasMember.addSubjectLookup(new WsSubjectLookup(null, "g:gsa", groupMemberName));
        WsHasMemberResults wsHasMemberResults = gcHasMember.execute();
        if (GrouperClientUtils.length(wsHasMemberResults.getResults()) == 1) {
            WsHasMemberResult wsHasMemberResult = wsHasMemberResults.getResults()[0];
            return StringUtils.equals(
                    "IS_MEMBER", wsHasMemberResult.getResultMetadata().getResultCode());
        }
        return false;
    }