Checks whether the container contains the value i.

@param buf underlying buffer
@param position position of the container in the buffer
@param i index
@return whether the container contains the value i
8068
public static boolean contains(ByteBuffer buf, int position, final short i) {
    final int x = toIntUnsigned(i);
    return (buf.getLong(x / 64 * 8 + position) & (1L << x)) != 0;
  }
94674
private boolean hasChangedPosition(I_CmsDropTarget target) {

        if ((m_currentTarget != target) || (m_currentIndex != target.getPlaceholderIndex())) {
            m_currentTarget = target;
            m_currentIndex = target.getPlaceholderIndex();
            return true;
        }
        return false;
    }
1084670
public boolean set(final int index, final ByteBuffer buf) {
		if (!validState) {
			throw new InvalidStateException();
		}
		if (log.isDebugEnabled()) {
			log.debug("set(" + index + "," + buf + ")");
		}
		try {
			if (buf.limit() > blockSize) {
				log.error("ERROR: buffer.capacity=" + buf.limit() + " > blocksize=" + blockSize);
			}
			if (useMmap) {
				final MappedByteBuffer mbb = getMmapForIndex(index);
				if (mbb != null) {
					mbb.put(buf);
					return true;
				}
				// Fallback to RAF
			}
			fileChannel.position(index * blockSize).write(buf);
			return true;
		} catch (Exception e) {
			log.error("Exception in set(" + index + ")", e);
		}
		return false;
	}
909000
public static int getInt(ByteBuffer buf, int index) {
        return buf.order() == BIG_ENDIAN ? getIntB(buf, index) : getIntL(buf, index);
    }
766612
private void checkAtMost(int i) throws ContradictionException {
		ISet ker = target.getMandSet(g, i);
		ISet env = target.getPotSet(g, i);
		int size = ker.size();
		if (size > degrees[i]) {
			g.removeNode(i, this);
		} else if (size == degrees[i] && env.size() > size) {
			for (int other : env) {
				if (!ker.contains(other)) {
					target.remove(g, i, other, this);
				}
			}
		}
	}
900654
public boolean contains(long minimum, long supremum) {
    MutableRoaringBitmap.rangeSanityCheck(minimum, supremum);
    short firstKey = highbits(minimum);
    short lastKey = highbits(supremum);
    int span = BufferUtil.toIntUnsigned(lastKey) - BufferUtil.toIntUnsigned(firstKey);
    int len = highLowContainer.size();
    if (len < span) {
      return false;
    }
    int begin = highLowContainer.getIndex(firstKey);
    int end = highLowContainer.getIndex(lastKey);
    end = end < 0 ? -end -1 : end;
    if (begin < 0 || end - begin != span) {
      return false;
    }

    int min = (short)minimum & 0xFFFF;
    int sup = (short)supremum & 0xFFFF;
    if (firstKey == lastKey) {
      return highLowContainer.getContainerAtIndex(begin).contains(min, sup);
    }
    if (!highLowContainer.getContainerAtIndex(begin).contains(min, 1 << 16)) {
      return false;
    }
    if (end < len && !highLowContainer.getContainerAtIndex(end).contains(0, sup)) {
      return false;
    }
    for (int i = begin + 1; i < end; ++i) {
      if (highLowContainer.getContainerAtIndex(i).getCardinality() != 1 << 16) {
        return false;
      }
    }
    return true;
  }
855532
function buffer_empty(buf) {
  for (var i = buf.length - 1; i > 0; i--) {
    if (buf[i]) { return false; }
  }

  return true;
}
853289
public boolean containsValue(Object value) {
		// the value is a direct hit from our cache
		if(cache.containsValue(value))
			return true;
		// the value is a direct hit from our hashmap
		if(container.containsValue(value))
			return true;
		
		// otherwise, the value isn't within this object
		return false;
	}
1255476
@Override
    public IReaction getReaction(int position) {

        if (!hashMapChain.containsValue(position)) return null;

        Set<Entry<IReaction, Integer>> entries = hashMapChain.entrySet();
        for (Iterator<Entry<IReaction, Integer>> it = entries.iterator(); it.hasNext();) {
            Entry<IReaction, Integer> entry = it.next();
            if (entry.getValue().equals(position)) return entry.getKey();
        }

        return null;
    }
462933
static int positionValue(Encoding enc, int i) {
        if (i < ByteValTable.length) {
            if (i == 0 && enc.minLength() > 1) {
                return 20;
            } else {
                return ByteValTable[i];
            }
        } else {
            return 4; /* Take it easy. */
        }
    }
1123550
public boolean contains(Vector3f point) {
        return contains(point.getX(), point.getY(), point.getZ());
    }
2544
public boolean containsPoint(INDArray point) {
        double first = point.getDouble(0), second = point.getDouble(1);
        return x - hw <= first && x + hw >= first && y - hh <= second && y + hh >= second;
    }
934650
public static boolean containsAt(byte[] arra, int start, byte[] arrb) {
        return countSameElements(arra, start, arrb) == arrb.length;
    }
146833
public final boolean overlaps(long position, long size) {
        if (position + size <= this.position)
            return false;               // That is below this
        if (this.position + this.size <= position)
            return false;               // This is below that
        return true;
    }
386552
private int findBacktrackPosition(final int position) {
        int currentPosition = position;

        // check against stack size after the instruction was executed
        while (stackSizes.get(currentPosition).getRight() > 0) {
            currentPosition++;
        }

        return currentPosition;
    }
330091
public boolean contains(int element) {
    return element >= 0 && this.imported(element) && this.pos.get(Math.abs(element)) >= 0;
  }
826280
def contain? position
      position = Position.normalize(position)
      return false if position.line < start.line || position.line > ending.line
      return false if position.line == start.line && position.character < start.character
      return false if position.line == ending.line && position.character > ending.character
      true
    end