Sets the initial offset of each group.

@param offset
@return
507087
public GroupOptions setOffset(@Nullable Integer offset) {

		this.offset = offset == null ? null : Math.max(0, offset);
		return this;
	}
224593
final public void setOffset(Integer start, Integer end) {
    if ((start == null) || (end == null)) {
      // do nothing
    } else if (start > end) {
      throw new IllegalArgumentException("Start offset after end offset");
    } else {
      tokenOffset = new MtasOffset(start, end);
    }
  }
1218535
public static String nameFromOffset(long offset) {
        NumberFormat nf = NumberFormat.getInstance();
        nf.setMinimumIntegerDigits(20);
        nf.setMaximumFractionDigits(0);
        nf.setGroupingUsed(false);
        return nf.format(offset) + Log.FileSuffix;
    }
571763
def offset(self, offset):
        """"""
        clone = self._clone()

        if isinstance(offset, int):
            clone._offset = offset

        return clone
224126
static SingleOffsetTimezone of(ZonalOffset offset) {

        if (
            (offset.getIntegralAmount() == 0)
            && (offset.getFractionalAmount() == 0)
        ) {
            return UTC;
        } else {
            return new SingleOffsetTimezone(offset);
        }

    }
229068
public void addLineOffset(int offset) {
        if (numLines >= lineNumberMap.length) {
            // Grow the line number map.
            int capacity = lineNumberMap.length * 2;
            int[] newLineNumberMap = new int[capacity];
            System.arraycopy(lineNumberMap, 0, newLineNumberMap, 0, lineNumberMap.length);
            lineNumberMap = newLineNumberMap;
        }

        lineNumberMap[numLines++] = offset;
    }
58501
public Range move(int offset) {
        if (offset == 0)
            return this;
        return new Range(lower + offset, upper + offset, reversed);
    }
1211077
@Override
    public C setOffset(final double x, final double y)
    {
        getAttributes().setOffset(x, y);

        return cast();
    }
154595
@Override
  public QueryBuilder<V> increaseOffsetBy(Integer amount) {
    if (offset == null) {
      offset = 0;
    }
    this.offset += amount;
    return this;
  }
1031686
private void setMapForKeyGroup(int keyGroupId, Map<N, Map<K, S>> map) {
		try {
			state[indexToOffset(keyGroupId)] = map;
		} catch (ArrayIndexOutOfBoundsException e) {
			throw new IllegalArgumentException("Key group index " + keyGroupId + " is out of range of key group " +
				"range [" + keyGroupOffset + ", " + (keyGroupOffset + state.length) + ").");
		}
	}
115470
public int getSourceLineNumberForOffset(final int offset) {

        int lineNumber = -1;
        lineNumber = 0;
        for (; lineNumber < this.lineStartOffsets.length - 1; lineNumber++) {

            if (this.lineStartOffsets[lineNumber + 1] > offset) {
                break;
            }
        }
        if (offset > lineStartOffsets[lineStartOffsets.length - 1]) {
            lineNumber = lineStartOffsets.length - 1;
        }

        // we now have line number, but it's 0-based. Need to convert to 1-based
        return lineNumber + 1;
    }
976893
public void set(int[] initial) {
        resizeLock.lock();
        try {
            if (initial.length != length) {
                throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
            }
            int unique = AtomicShortIntArray.getUnique(initial);
            int allowedPalette = AtomicShortIntPaletteBackingArray.getAllowedPalette(length);
            if (unique == 1) {
                store.set(new AtomicShortIntUniformBackingArray(length, initial[0]));
            } else if (unique > allowedPalette) {
                store.set(new AtomicShortIntDirectBackingArray(length, initial));
            } else {
                store.set(new AtomicShortIntPaletteBackingArray(length, unique, initial));
            }
        } finally {
            resizeLock.unlock();
        }
    }
747555
private void copyToOffset(int offset) {
    final int minCapacity = 2 * (offset + nbrruns);
    if (valueslength.length < minCapacity) {
      // expensive case where we need to reallocate
      int newCapacity = valueslength.length;
      while (newCapacity < minCapacity) {
        newCapacity = (newCapacity == 0) ? DEFAULT_INIT_SIZE
            : newCapacity < 64 ? newCapacity * 2
                : newCapacity < 1024 ? newCapacity * 3 / 2 : newCapacity * 5 / 4;
      }
      short[] newvalueslength = new short[newCapacity];
      copyValuesLength(this.valueslength, 0, newvalueslength, offset, nbrruns);
      this.valueslength = newvalueslength;
    } else {
      // efficient case where we just copy
      copyValuesLength(this.valueslength, 0, this.valueslength, offset, nbrruns);
    }
  }
534371
public function offsetUnset($offset)
    {
        unset($this->map[$offset]);
        $this->origin = $this->map->keys();
        return $this;
    }
808944
public void setShort(int offset, int value)
  {
    byte []code = getCode();
    
    code[offset + 0]  = (byte) (value >> 8);
    code[offset + 1]  = (byte) (value);
  }
788184
public void setRow(int i, double[] array, int offset)
    {
        int n = cols;
        for (int j=0;j<n;j++)
        {
            set(i, j, array[j+offset]);
        }
    }
1044550
public Span adjust(int offset, int n){
		if( offset < 0 )return this; //null
		
		if( offset < end ){
			end += n;
			if( end<offset )end = offset;
		}
		else return this; //null
		
		if( offset < start ){
			start += n;
			if( start<offset )start = offset;
		}
		return this;	
	}