OpenKeyWord  Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
okw.core.Matcher Klassenreferenz
+ Zusammengehörigkeiten von okw.core.Matcher:

Öffentliche, statische Methoden

static int LevenshteinDistance (String a, String b)
 
static boolean LevenshteinMatch (String fpsActuell, String fpsExpected, int fpiDistance)
 
static boolean LevenshteinMatch (ArrayList< String > fpALActuell, ArrayList< String > fpALExpected, int fpiDistance)
 
static boolean WildcardMatch (String fpsActuell, String fpsExpected)
 
static boolean WildcardMatch (ArrayList< String > fpALActuell, ArrayList< String > fpALExpected)
 
static boolean RegexMatch (String fpsActuell, String fpsExpectedRegex)
 
static boolean RegexMatch (ArrayList< String > fpALActuell, ArrayList< String > fpALExpected)
 

Ausführliche Beschreibung

Definiert in Zeile 41 der Datei Matcher.java.

Dokumentation der Elementfunktionen

◆ LevenshteinMatch()

static boolean okw.core.Matcher.LevenshteinMatch ( ArrayList< String >  fpALActuell,
ArrayList< String >  fpALExpected,
int  fpiDistance 
)
static
Parameter
fpsActuellText to test
fpsExpected(Wildcard) pattern to test
Rückgabe
True if the text matches the LevenshteinMatch pattern

Definiert in Zeile 83 der Datei Matcher.java.

84  {
85  boolean lvb_Return = true;
86 
87  Integer ActualSize = (Integer)fpALActuell.size();
88  Integer ExpectedSize = (Integer)fpALExpected.size();
89 
90  if( ActualSize.equals( ExpectedSize ))
91  {
92 
93  for (int i = 0; i < fpALActuell.size(); i++)
94  {
95  if ( ! Matcher.LevenshteinMatch(fpALActuell.get(i), fpALExpected.get(i), fpiDistance ) )
96  {
97  lvb_Return = false;
98  break;
99  }
100  }
101  }
102  else
103  {
104  lvb_Return = false;
105  }
106 
107  return lvb_Return;
108  }

◆ RegexMatch()

static boolean okw.core.Matcher.RegexMatch ( ArrayList< String >  fpALActuell,
ArrayList< String >  fpALExpected 
)
static
Parameter
fpsActuellText to test
fpsExpected(Wildcard) pattern to test
Rückgabe
True if the text matches the wildcard pattern

Definiert in Zeile 173 der Datei Matcher.java.

174  {
175  boolean lvb_Return = true;
176 
177  Integer ActualSize = (Integer)fpALActuell.size();
178  Integer ExpectedSize = (Integer)fpALExpected.size();
179 
180  if( ActualSize.equals( ExpectedSize ))
181  {
182 
183  for (int i = 0; i < fpALActuell.size(); i++)
184  {
185  if ( ! Matcher.RegexMatch(fpALActuell.get(i), fpALExpected.get(i)) )
186  {
187  lvb_Return = false;
188  break;
189  }
190  }
191  }
192  else
193  {
194  lvb_Return = false;
195  }
196 
197  return lvb_Return;
198  }

◆ WildcardMatch() [1/2]

static boolean okw.core.Matcher.WildcardMatch ( ArrayList< String >  fpALActuell,
ArrayList< String >  fpALExpected 
)
static
Parameter
fpsActuellText to test
fpsExpected(Wildcard) pattern to test
Rückgabe
True if the text matches the wildcard pattern

Definiert in Zeile 131 der Datei Matcher.java.

132  {
133  boolean lvb_Return = true;
134 
135  Integer ActualSize = (Integer)fpALActuell.size();
136  Integer ExpectedSize = (Integer)fpALExpected.size();
137 
138  if( ActualSize.equals( ExpectedSize ))
139  {
140 
141  for (int i = 0; i < fpALActuell.size(); i++)
142  {
143  if ( ! Matcher.WildcardMatch(fpALActuell.get(i), fpALExpected.get(i)) )
144  {
145  lvb_Return = false;
146  break;
147  }
148  }
149  }
150  else
151  {
152  lvb_Return = false;
153  }
154 
155  return lvb_Return;
156  }
+ Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ WildcardMatch() [2/2]

static boolean okw.core.Matcher.WildcardMatch ( String  fpsActuell,
String  fpsExpected 
)
static
Parameter
fpsActuellText to test
fpsExpected(Wildcard) pattern to test
Rückgabe
True if the text matches the wildcard pattern

Definiert in Zeile 116 der Datei Matcher.java.

117  {
118  boolean lvb_Return = false;
119 
120  lvb_Return = fpsActuell.matches(fpsExpected.replace("?", ".").replace("*", ".*").replace("#", "\\d"));
121 
122  return lvb_Return;
123  }
+ Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: