C# Class Antlr4.Runtime.Misc.Interval

An immutable inclusive interval a..b.
An immutable inclusive interval a..b.
Datei anzeigen Open project: antlr/antlr4 Class Usage Examples

Public Properties

Property Type Description
Invalid Antlr4.Runtime.Misc.Interval
a int
b int

Public Methods

Method Description
Adjacent ( Antlr4 other ) : bool

Are two intervals adjacent such as 0..41 and 42..42?

DifferenceNotProperlyContained ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval?

Return the interval with elements from this not in other ; other must not be totally enclosed (properly contained) within this , which would result in two disjoint intervals instead of the single one returned by this method.

Disjoint ( Antlr4 other ) : bool

Are both ranges disjoint? I.e., no overlap?

Equals ( object o ) : bool
GetHashCode ( ) : int
Intersection ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval

Return the interval in common between this and o

Interval ( int a, int b ) : System
Of ( int a, int b ) : Antlr4.Runtime.Misc.Interval

Interval objects are used readonly so share all with the same single value a==b up to some max size.

Interval objects are used readonly so share all with the same single value a==b up to some max size. Use an array as a perfect hash. Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new Interval object with a..a in it. On Java.g4, 218623 IntervalSets have a..a (set with 1 element).

ProperlyContains ( Antlr4 other ) : bool
StartsAfter ( Antlr4 other ) : bool

Does this.a start after other.b? May or may not be disjoint

StartsAfterDisjoint ( Antlr4 other ) : bool

Does this start completely after other? Disjoint

StartsAfterNonDisjoint ( Antlr4 other ) : bool

Does this start after other? NonDisjoint

StartsBeforeDisjoint ( Antlr4 other ) : bool

Does this start completely before other? Disjoint

StartsBeforeNonDisjoint ( Antlr4 other ) : bool

Does this start at or before other? Nondisjoint

ToString ( ) : string
Union ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval

Return the interval computed from combining this and other

Method Details

Adjacent() public method

Are two intervals adjacent such as 0..41 and 42..42?
public Adjacent ( Antlr4 other ) : bool
other Antlr4
return bool

DifferenceNotProperlyContained() public method

Return the interval with elements from this not in other ; other must not be totally enclosed (properly contained) within this , which would result in two disjoint intervals instead of the single one returned by this method.
public DifferenceNotProperlyContained ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval?
other Antlr4
return Antlr4.Runtime.Misc.Interval?

Disjoint() public method

Are both ranges disjoint? I.e., no overlap?
public Disjoint ( Antlr4 other ) : bool
other Antlr4
return bool

Equals() public method

public Equals ( object o ) : bool
o object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Intersection() public method

Return the interval in common between this and o
public Intersection ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval
other Antlr4
return Antlr4.Runtime.Misc.Interval

Interval() public method

public Interval ( int a, int b ) : System
a int
b int
return System

Of() public static method

Interval objects are used readonly so share all with the same single value a==b up to some max size.
Interval objects are used readonly so share all with the same single value a==b up to some max size. Use an array as a perfect hash. Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new Interval object with a..a in it. On Java.g4, 218623 IntervalSets have a..a (set with 1 element).
public static Of ( int a, int b ) : Antlr4.Runtime.Misc.Interval
a int
b int
return Antlr4.Runtime.Misc.Interval

ProperlyContains() public method

public ProperlyContains ( Antlr4 other ) : bool
other Antlr4
return bool

StartsAfter() public method

Does this.a start after other.b? May or may not be disjoint
public StartsAfter ( Antlr4 other ) : bool
other Antlr4
return bool

StartsAfterDisjoint() public method

Does this start completely after other? Disjoint
public StartsAfterDisjoint ( Antlr4 other ) : bool
other Antlr4
return bool

StartsAfterNonDisjoint() public method

Does this start after other? NonDisjoint
public StartsAfterNonDisjoint ( Antlr4 other ) : bool
other Antlr4
return bool

StartsBeforeDisjoint() public method

Does this start completely before other? Disjoint
public StartsBeforeDisjoint ( Antlr4 other ) : bool
other Antlr4
return bool

StartsBeforeNonDisjoint() public method

Does this start at or before other? Nondisjoint
public StartsBeforeNonDisjoint ( Antlr4 other ) : bool
other Antlr4
return bool

ToString() public method

public ToString ( ) : string
return string

Union() public method

Return the interval computed from combining this and other
public Union ( Antlr4 other ) : Antlr4.Runtime.Misc.Interval
other Antlr4
return Antlr4.Runtime.Misc.Interval

Property Details

Invalid public_oe static_oe property

public static Antlr4.Runtime.Misc.Interval Invalid
return Antlr4.Runtime.Misc.Interval

a public_oe property

The start of the interval.
The start of the interval.
public int a
return int

b public_oe property

The end of the interval (inclusive).
The end of the interval (inclusive).
public int b
return int