C# 클래스 PutioFS.Core.LongRange

A class to represent a range of long values. Start is inclusive, End is exclusive.
상속: IComparable
파일 보기 프로젝트 열기: firat/PutioFS 1 사용 예제들

공개 메소드들

메소드 설명
CompareTo ( object obj ) : int

First compare the Start values, if they are equal, compare End values.

Contains ( long value ) : System.Boolean

Check if the range contains the given value.

Intersects ( LongRange range ) : System.Boolean

Check if this object intersects with the given range. Start positions are inclusive and End positions are exclusive.

IsConsequent ( LongRange range ) : System.Boolean

Check if this objects comes RIGHT AFTER or RIGHT BEFORE the given range. That is. this.Start is equal to range.End or vice versa.

LongRange ( long start, long end ) : System

Never ever let a LongRange with an end value that is smaller than or equal to its start value

Merge ( LongRange range ) : void

Merge this LongRange with a one that intersects it.

TryMerge ( LongRange range ) : System.Boolean

Try to merge two Ranges. Do nothing if they are not consecutive or intersecting ranges. Return true if merged, false otherwise.

메소드 상세

CompareTo() 공개 메소드

First compare the Start values, if they are equal, compare End values.
public CompareTo ( object obj ) : int
obj object
리턴 int

Contains() 공개 메소드

Check if the range contains the given value.
public Contains ( long value ) : System.Boolean
value long
리턴 System.Boolean

Intersects() 공개 메소드

Check if this object intersects with the given range. Start positions are inclusive and End positions are exclusive.
public Intersects ( LongRange range ) : System.Boolean
range LongRange
리턴 System.Boolean

IsConsequent() 공개 메소드

Check if this objects comes RIGHT AFTER or RIGHT BEFORE the given range. That is. this.Start is equal to range.End or vice versa.
public IsConsequent ( LongRange range ) : System.Boolean
range LongRange
리턴 System.Boolean

LongRange() 공개 메소드

Never ever let a LongRange with an end value that is smaller than or equal to its start value
public LongRange ( long start, long end ) : System
start long
end long
리턴 System

Merge() 공개 메소드

Merge this LongRange with a one that intersects it.
public Merge ( LongRange range ) : void
range LongRange
리턴 void

TryMerge() 공개 메소드

Try to merge two Ranges. Do nothing if they are not consecutive or intersecting ranges. Return true if merged, false otherwise.
public TryMerge ( LongRange range ) : System.Boolean
range LongRange
리턴 System.Boolean