Example usage for org.eclipse.jdt.core.dom PostfixExpression.Operator equals

List of usage examples for org.eclipse.jdt.core.dom PostfixExpression.Operator equals

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom PostfixExpression.Operator equals.

Prototype

@Override
public final boolean equals(Object obj) 

Source Link

Document

The ASTNode implementation of this Object method uses object identity (==).

Usage

From source file:org.autorefactor.refactoring.ASTHelper.java

License:Open Source License

/**
 * Returns whether the provided operator is the same as the one of provided node.
 *
 * @param node the node for which to test the operator
 * @param operator the operator to test/* ww  w .j  a  v  a2  s  . c  o m*/
 * @return true if the provided node has the provided operator, false otherwise.
 */
public static boolean hasOperator(PostfixExpression node, PostfixExpression.Operator operator) {
    return node != null && operator.equals(node.getOperator());
}