Range Class

  • java.lang.Object
    • com.microsoft.azure.elasticdb.shard.base.Range

public class Range

Represents a left-inclusive, right-exclusive range of values.

Constructor Summary

Constructor Description
Range(Object low)

Constructs range based on its low boundary value. The low boundary value is set to the one specified in low while the high boundary value is set to maximum possible value i.e. +infinity.

Range(Object low, Object high)

Constructs range based on its low and high boundary values.

Method Summary

Modifier and Type Method and Description
boolean equals(Object obj)

Determines whether the specified object is equal to the current object.

boolean equals(Range other)

Performs equality comparison with another Range.

Object getHigh()
Object getLow()
ShardRange getShardRange()
int hashCode()

Calculates the hash code for this instance.

boolean isHighMax()
String toString()

Converts the object to its string representation.

Constructor Details

Range

public Range(Object low)

Constructs range based on its low boundary value. The low boundary value is set to the one specified in low while the high boundary value is set to maximum possible value i.e. +infinity.

Parameters:

low - Low boundary value (inclusive).

Range

public Range(Object low, Object high)

Constructs range based on its low and high boundary values.

Parameters:

low - Low boundary value (inclusive).
high - High boundary value (exclusive).

Method Details

equals

public boolean equals(Object obj)

Determines whether the specified object is equal to the current object.

Parameters:

obj - The object to compare with the current object.

Returns:

True if the specified object is equal to the current object; otherwise, false.

equals

public boolean equals(Range other)

Performs equality comparison with another Range.

Parameters:

other - Range to compare with.

Returns:

True if same Range, false otherwise.

getHigh

public Object getHigh()

getLow

public Object getLow()

getShardRange

public ShardRange getShardRange()

hashCode

public int hashCode()

Calculates the hash code for this instance.

Returns:

Hash code for the object.

isHighMax

public boolean isHighMax()

toString

public String toString()

Converts the object to its string representation.

Returns:

String representation of the object.

Applies to