@Test void testMatch() throws Exception { }
public boolean match(List<TokenElement> tokens) { if (tokens.size() == 0) { return false; } for (int i = 0; i < tokens.size(); i++) { boolean result = true; for (int j = 0; j < elements.size(); j++) { if (tokens.size() <= i+j) { result = false; break; } else if (!tokens.get(i+j).getSurface().equals(elements.get(j).getSurface())) { result = false; } } if (result) { return true; } } return false; }
ExpressionRule { public boolean match(List<TokenElement> tokens) { if (tokens.size() == 0) { return false; } for (int i = 0; i < tokens.size(); i++) { boolean result = true; for (int j = 0; j < elements.size(); j++) { if (tokens.size() <= i+j) { result = false; break; } else if (!tokens.get(i+j).getSurface().equals(elements.get(j).getSurface())) { result = false; } } if (result) { return true; } } return false; } }
ExpressionRule { public boolean match(List<TokenElement> tokens) { if (tokens.size() == 0) { return false; } for (int i = 0; i < tokens.size(); i++) { boolean result = true; for (int j = 0; j < elements.size(); j++) { if (tokens.size() <= i+j) { result = false; break; } else if (!tokens.get(i+j).getSurface().equals(elements.get(j).getSurface())) { result = false; } } if (result) { return true; } } return false; } ExpressionRule(); }
ExpressionRule { public boolean match(List<TokenElement> tokens) { if (tokens.size() == 0) { return false; } for (int i = 0; i < tokens.size(); i++) { boolean result = true; for (int j = 0; j < elements.size(); j++) { if (tokens.size() <= i+j) { result = false; break; } else if (!tokens.get(i+j).getSurface().equals(elements.get(j).getSurface())) { result = false; } } if (result) { return true; } } return false; } ExpressionRule(); ExpressionRule addElement(TokenElement element); String toSurface(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); boolean match(List<TokenElement> tokens); }
ExpressionRule { public boolean match(List<TokenElement> tokens) { if (tokens.size() == 0) { return false; } for (int i = 0; i < tokens.size(); i++) { boolean result = true; for (int j = 0; j < elements.size(); j++) { if (tokens.size() <= i+j) { result = false; break; } else if (!tokens.get(i+j).getSurface().equals(elements.get(j).getSurface())) { result = false; } } if (result) { return true; } } return false; } ExpressionRule(); ExpressionRule addElement(TokenElement element); String toSurface(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); boolean match(List<TokenElement> tokens);  }