selop.java
来自「用于传感器网络的节点操作系统 TinyOS 结构设计非常有意思」· Java 代码 · 共 43 行
JAVA
43 行
package net.tinyos.tinydb;import java.util.*;public class SelOp { public static final byte OP_EQ = 0; public static final byte OP_NEQ = 1; public static final byte OP_GT = 2; public static final byte OP_GE = 3; public static final byte OP_LT = 4; public static final byte OP_LE = 5; public SelOp(byte type) throws NoSuchElementException { if (type < OP_EQ || type > OP_LE) throw new NoSuchElementException(); this.type = type; } public byte toByte() { return type; } public String toString() { switch (type) { case OP_EQ: return "="; case OP_NEQ: return "<>"; case OP_GT: return ">"; case OP_GE: return ">="; case OP_LT: return "<"; case OP_LE: return "<="; } return ""; } private byte type;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?