Microsoft SDK for Java

contains

The contains method of the IntRanges Class contains the following signatures:

contains(int find)
contains(int s, int e)

contains(int find)

Searches from the beginning of a range for a given number.

Syntax

public boolean contains(int find);

Exceptions

Throws IllegalArgumentException if the parameter is invalid.

Return Value

Returns true if the number was found; otherwise, returns false.

Parameters

find The number to search for.

contains(int s, int e)

Searches from the beginning of a range for a given range of numbers.

Syntax

public synchronized boolean contains(int s, int e);

Exceptions

Throws IllegalArgumentException if the parameter is invalid.

Return Value

Returns true if the entire search range was found; otherwise, returns false.

Parameters

s The lower limit of the range.
e The upper limit of the range.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.