GrammarScope  4.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes | List of all members
grammarscope.server.iface.Segment Class Reference
Inheritance diagram for grammarscope.server.iface.Segment:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.server.iface.Segment:
Collaboration graph
[legend]

Public Member Functions

 Segment (final int from, final int to)
 
boolean equals (final Object obj)
 
int hashCode ()
 
boolean isVisible ()
 
String getText (final String text)
 
String getText (final String text, final int offset)
 
String toString ()
 

Static Public Member Functions

static Segment merge (final List<? extends Segment > segments)
 
static Segment merge (final Segment... segments)
 

Public Attributes

final int from
 
final int to
 

Static Private Attributes

static final long serialVersionUID = 3932152698165633682L
 

Detailed Description

Segment (pair of from- and to-indices). Indices refer to nth character in text. To-index is not included in segment.

Author
Bernard Bou

Constructor & Destructor Documentation

◆ Segment()

grammarscope.server.iface.Segment.Segment ( final int  from,
final int  to 
)

Constructor

Parameters
fromfrom index
toto index

Member Function Documentation

◆ equals()

boolean grammarscope.server.iface.Segment.equals ( final Object  obj)

◆ getText() [1/2]

String grammarscope.server.iface.Segment.getText ( final String  text)

Extract text

Parameters
texttext
Returns
segment

◆ getText() [2/2]

String grammarscope.server.iface.Segment.getText ( final String  text,
final int  offset 
)

Extract text

Parameters
texttext
offsetoffset
Returns
segment

◆ hashCode()

int grammarscope.server.iface.Segment.hashCode ( )

◆ isVisible()

boolean grammarscope.server.iface.Segment.isVisible ( )

Whether segment is visible

Returns
Whether segment is visible

◆ merge() [1/2]

static Segment grammarscope.server.iface.Segment.merge ( final List<? extends Segment segments)
static

Merge segments into one

Parameters
segmentsordered segments
Returns
segment

◆ merge() [2/2]

static Segment grammarscope.server.iface.Segment.merge ( final Segment...  segments)
static

Merge segments to segment

Parameters
segmentsordered segments
Returns
segment

◆ toString()

String grammarscope.server.iface.Segment.toString ( )

Member Data Documentation

◆ from

final int grammarscope.server.iface.Segment.from

From index

◆ serialVersionUID

final long grammarscope.server.iface.Segment.serialVersionUID = 3932152698165633682L
staticprivate

◆ to

final int grammarscope.server.iface.Segment.to

To index (excluded)


The documentation for this class was generated from the following file: