Get a tick range given a tick value
@param tick
@return TickRange
503819
public synchronized TickRange getTickRange(long tick)
  {
    oststream.setCursor(tick);

    // Get the TickRange
    return (TickRange) oststream.getNext().clone();
  }
544049
public static Range valueOf(final String value) {
        final Optional<Integer[]> vals = parse(value);
        if (vals.isPresent()) {
            return new Range(vals.get()[0], vals.get()[1]);
        }
        return null;
    }
658379
public static Protos.Value.Range range(long begin, long end) {
		return Protos.Value.Range.newBuilder().setBegin(begin).setEnd(end).build();
	}
1349269
public Range<Integer> getCardRange(String id) {
        Preconditions.checkState(mGroupBasicAdapter != null, "Must call bindView() first");
        return this.mGroupBasicAdapter.getCardRange(id);
    }
857843
def range(self, axis=None):
        
        return (self.min(axis=axis), self.max(axis=axis))
538772
@Override
    public ValueRange range(ChronoField field) {
        switch (field) {
            case ALIGNED_WEEK_OF_MONTH:
                return alignedWeekOfMonthRange;
            case ALIGNED_WEEK_OF_YEAR:
                return ALIGNED_WEEK_OF_YEAR_RANGE;
            case DAY_OF_MONTH:
                return dayOfMonthRange;
            case DAY_OF_YEAR:
                return DAY_OF_YEAR_RANGE;
            case MONTH_OF_YEAR:
                return getDivision().getMonthsInYearRange();
            case PROLEPTIC_MONTH:
                return getDivision() == THIRTEEN_EVEN_MONTHS_OF_4_WEEKS ? PROLEPTIC_MONTH_RANGE_13 : PROLEPTIC_MONTH_RANGE_12;
            default:
                break;
        }
        return field.range();
    }
462310
TokenRange range(JavaToken begin, JavaToken end) {
        if (storeTokens) {
            return new TokenRange(begin, end);
        }
        return null;
    }
678923
public Bits range(final int start, final int length) {
    if (0 == length) {
      return Bits.NULL;
    }
    if (start < 0) {
      throw new IllegalArgumentException();
    }
    if (start + length > this.bitLength) {
      throw new IllegalArgumentException();
    }
    final Bits returnValue = new Bits(
      new byte[(int) Math.ceil(length / 8.)],
      length);
    shiftLeft(this.bytes, start, returnValue.bytes);
    int bitsInLastByte = length % 8;
    if (0 == bitsInLastByte) {
      bitsInLastByte = 8;
    }
    returnValue.bytes[returnValue.bytes.length - 1] &= 0xFF << 8 - bitsInLastByte;
    return returnValue;
  }
25405
def _xxrange(self, start, end, step_count):
        """"""
        _step = (end - start) / float(step_count)
        return (start + (i * _step) for i in xrange(int(step_count)))
802387
@Override
    public ValueRange range(ChronoField field) {
        switch (field) {
            case ALIGNED_DAY_OF_WEEK_IN_YEAR:
            case ALIGNED_DAY_OF_WEEK_IN_MONTH:
            case DAY_OF_WEEK:
                return ValueRange.of(1, DAYS_IN_WEEK);
            case ALIGNED_WEEK_OF_MONTH:
                return ValueRange.of(1, WEEKS_IN_MONTH, WEEKS_IN_MONTH_LONG);
            case ALIGNED_WEEK_OF_YEAR:
                return ValueRange.of(1, WEEKS_IN_YEAR, WEEKS_IN_YEAR + 1);
            case DAY_OF_MONTH:
                return DAY_OF_MONTH_RANGE;
            case DAY_OF_YEAR:
                return DAY_OF_YEAR_RANGE;
            case EPOCH_DAY:
                return EPOCH_DAY_RANGE;
            case ERA:
                return ERA_RANGE;
            case MONTH_OF_YEAR:
                return MONTH_OF_YEAR_RANGE;
            case PROLEPTIC_MONTH:
                return PROLEPTIC_MONTH_RANGE;
            case YEAR_OF_ERA:
            case YEAR:
                return YEAR_RANGE;
            default:
                return field.range();
        }
    }
777402
def _ctorCmprRange(self, vals):
        '''
        
        '''

        if not isinstance(vals, (list, tuple)):
            raise s_exc.BadCmprValu(valu=vals, cmpr='*range=')

        if len(vals) != 2:
            raise s_exc.BadCmprValu(valu=vals, cmpr='*range=')

        tick, tock = self.getTickTock(vals)

        if tick > tock:
            # User input has requested a nullset
            def cmpr(valu):
                return False

            return cmpr

        def cmpr(valu):
            return tick <= valu <= tock

        return cmpr
1168978
function(tick, index, ticks) {
			var formattedTick = tick.format(this.displayFormat);
			var tickOpts = this.options.ticks;
			var callback = helpers.getValueOrDefault(tickOpts.callback, tickOpts.userCallback);

			if (callback) {
				return callback(formattedTick, index, ticks);
			}
			return formattedTick;
		}
34403
public static Range fromInterval(int start, int end) {
        if (start < 0) {
            throw new IllegalArgumentException("Range start must be >= 0: " + start);
        }
        if (end < 0) {
            throw new IllegalArgumentException("Range end must be >= 0: " + end);
        }
        if (end < start) {
            throw new IllegalArgumentException("Range end must be >= start: " + end + "<" + start);
        }
        return new Range(start, end - start);
    }
445147
public int getPreviousRangeIndex() {
        int length = rangeIndexList.size();
        if (length == 2) {
            rangeIndexList.remove(1);
            return 0;
        } else if (length == 1) {
            return 0;
        }
        rangeIndexList.remove(length - 1);
        rangeIndexList.remove(length - 2);
        Integer rindex = rangeIndexList.get(length - 3);
        return rindex.intValue();
    }
1193485
protected double getRange(ValueDimension dim) {
		return zeroBased ? diagram.getValues(dim).max().doubleValue() : diagram.getValues(dim).range();
	}
375153
function getRangeAfterCursor( cursor, inclusive ) {
				var range = editor.createRange();
				range.setStart( cursor.textNode, ( inclusive ? cursor.offset : cursor.offset + 1 ) );
				range.setEndAt( editor.editable(), CKEDITOR.POSITION_BEFORE_END );
				return range;
			}
653139
public Range getAbsoluteRangeFor(Range relativeRange) {
        int from = convertBoundaryToAbsolutePosition(relativeRange.getFrom()),
                to = convertBoundaryToAbsolutePosition(relativeRange.getTo());
        return new Range(from, to);
    }