Package org.aksw.limes.core.util
Class ParenthesisMatcher
- java.lang.Object
-
- org.aksw.limes.core.util.ParenthesisMatcher
-
public class ParenthesisMatcher extends Object
-
-
Constructor Summary
Constructors Constructor Description ParenthesisMatcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intfindMatchingParenthesis(String str, int openParenthesisIndex)Computes the position of a matching closing parenthesis given the position of the opening parenthesisstatic voidmain(String[] args)
-
-
-
Method Detail
-
findMatchingParenthesis
public static int findMatchingParenthesis(String str, int openParenthesisIndex)
Computes the position of a matching closing parenthesis given the position of the opening parenthesis- Parameters:
str- String in which the parenthesis should be matchedopenParenthesisIndex- index of the parenthesis which should be matched with a closing one- Returns:
- index of closing parenthesis or -1 if string is empty or contains unmatched parenthesis
-
main
public static void main(String[] args)
-
-