Ignore:
Timestamp:
01/17/18 15:44:00 (6 years ago)
Author:
Oliver Schonefeld
Message:
  • add some convenience helper methods
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FCSSimpleEndpoint/trunk/src/main/java/eu/clarin/sru/server/fcs/parser/QueryNode.java

    r7159 r7162  
    9090    public QueryNodeType getNodeType() {
    9191        return nodeType;
     92    }
     93
     94
     95    /**
     96     * Check, if node if of given type.
     97     *
     98     * @param nodeType
     99     *            type to check against
     100     * @return <code>true</code> if node is of given type, <code>false</code>
     101     *         otherwise
     102     */
     103    public boolean hasNodeType(QueryNodeType nodeType) {
     104        if (nodeType == null) {
     105            throw new NullPointerException("nodeType == null");
     106        }
     107        return this.nodeType == nodeType;
    92108    }
    93109
Note: See TracChangeset for help on using the changeset viewer.