program
Class MatchingPair

java.lang.Object
  extended by program.MatchingPair

public class MatchingPair
extends java.lang.Object

Represents a matching pair of substrings. Matching pairs are identified in the second step of arc calculation. When day are accepted by all the rejecting rules, they are drawn.

Author:
Hannes

Constructor Summary
MatchingPair(java.lang.String str, int iContentLength, int indexStart, int indexEnd)
          Creates a new instance.
 
Method Summary
 boolean containsPair(MatchingPair pair)
          Returns if the particular instance 'contains' another matching pair.
 int getContentLength()
          Returns the number of items contained in the matching pair.
 int getEndFirstSubstr()
          Returns the end index of the first substring.
 int getEndSecondSubstr()
          Returns the end index of the second substring.
 int getStartFirstSubstr()
          Returns the start index of the first substring.
 int getStartSecondSubstr()
          Returns the start index of the second substring.
 java.lang.String getString()
          Returns the sting representing the matching pairs content.
 boolean isRepReg()
          Returns if the matching pair is a repetition region.
 void setRepReg(boolean isRepReg)
          Sets the matching pair a repetition region.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatchingPair

public MatchingPair(java.lang.String str,
                    int iContentLength,
                    int indexStart,
                    int indexEnd)
Creates a new instance.

Parameters:
str - a string, representing the matching pairs content
iContentLength - the number of items contained in the matching pair
indexStart - the matching pairs starting index (begin of the first substring)
indexEnd - the matching pairs final index (end of the second substring)
Method Detail

isRepReg

public boolean isRepReg()
Returns if the matching pair is a repetition region.


setRepReg

public void setRepReg(boolean isRepReg)
Sets the matching pair a repetition region.


getString

public java.lang.String getString()
Returns the sting representing the matching pairs content.


getContentLength

public int getContentLength()
Returns the number of items contained in the matching pair.


getStartFirstSubstr

public int getStartFirstSubstr()
Returns the start index of the first substring.


getEndFirstSubstr

public int getEndFirstSubstr()
Returns the end index of the first substring.


getStartSecondSubstr

public int getStartSecondSubstr()
Returns the start index of the second substring.


getEndSecondSubstr

public int getEndSecondSubstr()
Returns the end index of the second substring.


containsPair

public boolean containsPair(MatchingPair pair)
Returns if the particular instance 'contains' another matching pair. 'To contain' means that Xs first suubstring is a substring of Ys first substring and Xs second substring is a substring of Ys second substring.

Parameters:
pair - the pair to check

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object