/** * @return the number of strings that are matched by the given pattern. * @throws StackOverflowError if the given pattern generates a large, possibly infinite, number of strings. */ public long matchedStringsSize() { buildRootNode(); return rootNode.getNbrMatchedString(); }
/** * @return the number of strings that are matched by the given pattern. * @throws StackOverflowError * if the given pattern generates a large, possibly infinite, number of strings. */ public long matchedStringsSize() { buildRootNode(); return rootNode.getNbrMatchedString(); }
/** * @param indexOrder ( 1<= indexOrder <=n) * @return The matched string by the given pattern in the given it's order in the sorted list of matched String.<br> * <code>indexOrder</code> between 1 and <code>n</code> where <code>n</code> is the number of matched String.<br> If * indexOrder >= n , return an empty string. if there is an infinite number of String that matches the given Regex, * the method throws {@code StackOverflowError} */ public String getMatchedString(int indexOrder) { buildRootNode(); if (indexOrder == 0) indexOrder = 1; String result = buildStringFromNode(rootNode, indexOrder); result = result.substring(1, result.length() - 1); return result; }
/** * @param indexOrder * ( 1<= indexOrder <=n) * @return The matched string by the given pattern in the given it's order in the sorted list of matched String.<br> * <code>indexOrder</code> between 1 and <code>n</code> where <code>n</code> is the number of matched String.<br> * If indexOrder >= n , return an empty string. if there is an infinite number of String that matches the given Regex, the method throws * {@code StackOverflowError} */ public String getMatchedString(int indexOrder) { buildRootNode(); if (indexOrder == 0) indexOrder = 1; String result = buildStringFromNode(rootNode, indexOrder); result = result.substring(1, result.length() - 1); return result; }
/** * @return first string in lexicographical order that is matched by the given pattern. */ public String getFirstMatch() { buildRootNode(); Node node = rootNode; String result = ""; while (node.getNextNodes().size() > 0) { result = result.concat("" + node.getMinChar()); node = node.getNextNodes().get(0); } result = result.substring(1); return result; }
/** * @return first string in lexicographical order that is matched by the given pattern. */ public String getFirstMatch() { buildRootNode(); Node node = rootNode; String result = ""; while (node.getNextNodes().size() > 0) { result = result.concat("" + node.getMinChar()); node = node.getNextNodes().get(0); } result = result.substring(1); return result; }