Java Code Examples for org.apache.hadoop.hbase.filter.CompareFilter.CompareOp#name()

The following examples show how to use org.apache.hadoop.hbase.filter.CompareFilter.CompareOp#name() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ByteUtil.java    From phoenix with Apache License 2.0 6 votes vote down vote up
public static boolean compare(CompareOp op, int compareResult) {
    switch (op) {
        case LESS:
          return compareResult < 0;
        case LESS_OR_EQUAL:
          return compareResult <= 0;
        case EQUAL:
          return compareResult == 0;
        case NOT_EQUAL:
          return compareResult != 0;
        case GREATER_OR_EQUAL:
          return compareResult >= 0;
        case GREATER:
          return compareResult > 0;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}
 
Example 2
Source File: ByteUtil.java    From phoenix with Apache License 2.0 6 votes vote down vote up
public static boolean compare(CompareOp op, int compareResult) {
    switch (op) {
        case LESS:
          return compareResult < 0;
        case LESS_OR_EQUAL:
          return compareResult <= 0;
        case EQUAL:
          return compareResult == 0;
        case NOT_EQUAL:
          return compareResult != 0;
        case GREATER_OR_EQUAL:
          return compareResult >= 0;
        case GREATER:
          return compareResult > 0;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}
 
Example 3
Source File: ByteUtil.java    From phoenix with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static boolean compare(CompareOp op, int compareResult) {
    switch (op) {
        case LESS:
          return compareResult < 0;
        case LESS_OR_EQUAL:
          return compareResult <= 0;
        case EQUAL:
          return compareResult == 0;
        case NOT_EQUAL:
          return compareResult != 0;
        case GREATER_OR_EQUAL:
          return compareResult >= 0;
        case GREATER:
          return compareResult > 0;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}
 
Example 4
Source File: ByteUtil.java    From phoenix with Apache License 2.0 5 votes vote down vote up
public static boolean isInclusive(CompareOp op) {
    switch (op) {
        case LESS:
        case GREATER:
            return false;
        case EQUAL:
        case NOT_EQUAL:
        case LESS_OR_EQUAL:
        case GREATER_OR_EQUAL:
            return true;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}
 
Example 5
Source File: ByteUtil.java    From phoenix with Apache License 2.0 5 votes vote down vote up
public static boolean isInclusive(CompareOp op) {
    switch (op) {
        case LESS:
        case GREATER:
            return false;
        case EQUAL:
        case NOT_EQUAL:
        case LESS_OR_EQUAL:
        case GREATER_OR_EQUAL:
            return true;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}
 
Example 6
Source File: ByteUtil.java    From phoenix with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static boolean isInclusive(CompareOp op) {
    switch (op) {
        case LESS:
        case GREATER:
            return false;
        case EQUAL:
        case NOT_EQUAL:
        case LESS_OR_EQUAL:
        case GREATER_OR_EQUAL:
            return true;
        default:
          throw new RuntimeException("Unknown Compare op " + op.name());
    }
}