C# 클래스 Antlr4.Runtime.Misc.IntervalSet

A set of integers that relies on ranges being common to do "run-length-encoded" like compression (if you view an IntSet like a BitSet with runs of 0s and 1s).
A set of integers that relies on ranges being common to do "run-length-encoded" like compression (if you view an IntSet like a BitSet with runs of 0s and 1s). Only ranges are recorded so that a few ints up near value 1000 don't cause massive bitsets, just two integer intervals. element values may be negative. Useful for sets of EPSILON and EOF. 0..9 char range is index pair ['\u0030','\u0039']. Multiple ranges are encoded with multiple index pairs. Isolated elements are encoded with an index pair where both intervals are the same. The ranges are ordered and disjoint so that 2..6 appears before 101..103.
상속: IIntSet
파일 보기 프로젝트 열기: antlr/antlr4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CompleteCharSet Antlr4.Runtime.Misc.IntervalSet
EmptySet Antlr4.Runtime.Misc.IntervalSet

보호된 프로퍼티들

프로퍼티 타입 설명
@readonly bool
intervals IList

공개 메소드들

메소드 설명
Add ( int el ) : void

Add a single element to the set.

Add a single element to the set. An isolated element is stored as a range el..el.

Add ( int a, int b ) : void

Add interval; i.e., add all integers from a to b to set.

Add interval; i.e., add all integers from a to b to set. If b<a, do nothing. Keep list in sorted order (by left range value). If overlap, combine ranges. For example, If this is {1..5, 10..20}, adding 6..7 yields {1..5, 6..7, 10..20}. Adding 4..8 yields {1..8, 10..20}.

AddAll ( IIntSet set ) : Antlr4.Runtime.Misc.IntervalSet
And ( IIntSet other ) : Antlr4.Runtime.Misc.IntervalSet

Clear ( ) : void
Complement ( IIntSet vocabulary ) : Antlr4.Runtime.Misc.IntervalSet

Complement ( int minElement, int maxElement ) : Antlr4.Runtime.Misc.IntervalSet
Contains ( int el ) : bool

Equals ( object obj ) : bool

Are two IntervalSets equal? Because all intervals are sorted and disjoint, equals is a simple linear walk over both lists to make sure they are the same.

Are two IntervalSets equal? Because all intervals are sorted and disjoint, equals is a simple linear walk over both lists to make sure they are the same. Interval.equals() is used by the List.equals() method to check the ranges.

GetHashCode ( ) : int
GetIntervals ( ) : IList

Return a list of Interval objects.

Return a list of Interval objects.

IntervalSet ( Antlr4 set ) : System
IntervalSet ( IList intervals ) : System
Of ( int a, int b ) : Antlr4.Runtime.Misc.IntervalSet

Create a set with all ints within range [a..b] (inclusive)

Or ( Antlr4 sets ) : Antlr4.Runtime.Misc.IntervalSet

combine all sets in the array returned the or'd value

Or ( IIntSet a ) : Antlr4.Runtime.Misc.IntervalSet
Remove ( int el ) : void
SetReadonly ( bool @readonly ) : void
Subtract ( IIntSet a ) : Antlr4.Runtime.Misc.IntervalSet
ToArray ( ) : int[]
ToIntegerList ( ) : ArrayList
ToList ( ) : IList
ToSet ( ) : HashSet
ToString ( ) : string
ToString ( IVocabulary vocabulary ) : string
ToString ( bool elemAreChar ) : string

보호된 메소드들

메소드 설명
Add ( Interval addition ) : void

비공개 메소드들

메소드 설명
ElementName ( IVocabulary vocabulary, int a ) : string
IIntSet ( IIntSet set ) : IIntSet
IntervalSet ( ) : System
Of ( int a ) : Antlr4.Runtime.Misc.IntervalSet
Subtract ( Antlr4 left, Antlr4 right ) : Antlr4.Runtime.Misc.IntervalSet

메소드 상세

Add() 보호된 메소드

protected Add ( Interval addition ) : void
addition Interval
리턴 void

Add() 공개 메소드

Add a single element to the set.
Add a single element to the set. An isolated element is stored as a range el..el.
public Add ( int el ) : void
el int
리턴 void

Add() 공개 메소드

Add interval; i.e., add all integers from a to b to set.
Add interval; i.e., add all integers from a to b to set. If b<a, do nothing. Keep list in sorted order (by left range value). If overlap, combine ranges. For example, If this is {1..5, 10..20}, adding 6..7 yields {1..5, 6..7, 10..20}. Adding 4..8 yields {1..8, 10..20}.
public Add ( int a, int b ) : void
a int
b int
리턴 void

AddAll() 공개 메소드

public AddAll ( IIntSet set ) : Antlr4.Runtime.Misc.IntervalSet
set IIntSet
리턴 Antlr4.Runtime.Misc.IntervalSet

And() 공개 메소드

public And ( IIntSet other ) : Antlr4.Runtime.Misc.IntervalSet
other IIntSet
리턴 Antlr4.Runtime.Misc.IntervalSet

Clear() 공개 메소드

public Clear ( ) : void
리턴 void

Complement() 공개 메소드

public Complement ( IIntSet vocabulary ) : Antlr4.Runtime.Misc.IntervalSet
vocabulary IIntSet
리턴 Antlr4.Runtime.Misc.IntervalSet

Complement() 공개 메소드

public Complement ( int minElement, int maxElement ) : Antlr4.Runtime.Misc.IntervalSet
minElement int
maxElement int
리턴 Antlr4.Runtime.Misc.IntervalSet

Contains() 공개 메소드

public Contains ( int el ) : bool
el int
리턴 bool

Equals() 공개 메소드

Are two IntervalSets equal? Because all intervals are sorted and disjoint, equals is a simple linear walk over both lists to make sure they are the same.
Are two IntervalSets equal? Because all intervals are sorted and disjoint, equals is a simple linear walk over both lists to make sure they are the same. Interval.equals() is used by the List.equals() method to check the ranges.
public Equals ( object obj ) : bool
obj object
리턴 bool

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

GetIntervals() 공개 메소드

Return a list of Interval objects.
Return a list of Interval objects.
public GetIntervals ( ) : IList
리턴 IList

IntervalSet() 공개 메소드

public IntervalSet ( Antlr4 set ) : System
set Antlr4
리턴 System

IntervalSet() 공개 메소드

public IntervalSet ( IList intervals ) : System
intervals IList
리턴 System

Of() 공개 정적인 메소드

Create a set with all ints within range [a..b] (inclusive)
public static Of ( int a, int b ) : Antlr4.Runtime.Misc.IntervalSet
a int
b int
리턴 Antlr4.Runtime.Misc.IntervalSet

Or() 공개 정적인 메소드

combine all sets in the array returned the or'd value
public static Or ( Antlr4 sets ) : Antlr4.Runtime.Misc.IntervalSet
sets Antlr4
리턴 Antlr4.Runtime.Misc.IntervalSet

Or() 공개 메소드

public Or ( IIntSet a ) : Antlr4.Runtime.Misc.IntervalSet
a IIntSet
리턴 Antlr4.Runtime.Misc.IntervalSet

Remove() 공개 메소드

public Remove ( int el ) : void
el int
리턴 void

SetReadonly() 공개 메소드

public SetReadonly ( bool @readonly ) : void
@readonly bool
리턴 void

Subtract() 공개 메소드

public Subtract ( IIntSet a ) : Antlr4.Runtime.Misc.IntervalSet
a IIntSet
리턴 Antlr4.Runtime.Misc.IntervalSet

ToArray() 공개 메소드

public ToArray ( ) : int[]
리턴 int[]

ToIntegerList() 공개 메소드

public ToIntegerList ( ) : ArrayList
리턴 ArrayList

ToList() 공개 메소드

public ToList ( ) : IList
리턴 IList

ToSet() 공개 메소드

public ToSet ( ) : HashSet
리턴 HashSet

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

ToString() 공개 메소드

public ToString ( IVocabulary vocabulary ) : string
vocabulary IVocabulary
리턴 string

ToString() 공개 메소드

public ToString ( bool elemAreChar ) : string
elemAreChar bool
리턴 string

프로퍼티 상세

@readonly 보호되어 있는 프로퍼티

protected bool @readonly
리턴 bool

CompleteCharSet 공개적으로 정적으로 프로퍼티

public static Antlr4.Runtime.Misc.IntervalSet CompleteCharSet
리턴 Antlr4.Runtime.Misc.IntervalSet

EmptySet 공개적으로 정적으로 프로퍼티

public static Antlr4.Runtime.Misc.IntervalSet EmptySet
리턴 Antlr4.Runtime.Misc.IntervalSet

intervals 보호되어 있는 프로퍼티

The list of sorted, disjoint intervals.
The list of sorted, disjoint intervals.
protected IList intervals
리턴 IList