All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.hutool.core.lang.DefaultSegment Maven / Gradle / Ivy

There is a newer version: 5.8.33
Show newest version
package cn.hutool.core.lang;

/**
 * 片段默认实现
 *
 * @param  数字类型,用于表示位置index
 * @author looly
 * @since 5.5.3
 */
public class DefaultSegment implements Segment {

	protected T startIndex;
	protected T endIndex;

	/**
	 * 构造
	 * @param startIndex 起始位置
	 * @param endIndex 结束位置
	 */
	public DefaultSegment(T startIndex, T endIndex) {
		this.startIndex = startIndex;
		this.endIndex = endIndex;
	}

	@Override
	public T getStartIndex() {
		return this.startIndex;
	}

	@Override
	public T getEndIndex() {
		return this.endIndex;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy