Example usage for org.apache.commons.lang.text StrBuilder equals

List of usage examples for org.apache.commons.lang.text StrBuilder equals

Introduction

In this page you can find the example usage for org.apache.commons.lang.text StrBuilder equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Checks the contents of this builder against another to see if they contain the same character content.

Usage

From source file:org.eclipse.skalli.core.search.LuceneIndex.java

static private void addTerm(StrBuilder query, StrBuilder term, boolean isSimpleTerm) {
    term.trim();/*from   ww  w .  j a  v  a2 s.c o  m*/
    if (term.length() > 0) {
        if (query.length() > 0) {
            query.append(' ');
        }
        if (term.equals(AND) || term.equals(OR) || term.equals(NOT) || term.equals(TO)) {
            isSimpleTerm = false;
        }
        if (isSimpleTerm) {
            query.append('(');
            query.append('"').append(term).append('"');
            query.append(' ').append(term).append('*');
            query.append(' ').append(term).append('~');
            query.append(')');
        } else {
            query.append(term);
        }
    }
}