Returns the name ID of the specified node. @param data data reference @param labels labels @return name ID, or 0 if key does not exist
(final Data data, final String labels)
| 116 | * @return name ID, or {@code 0} if key does not exist |
| 117 | */ |
| 118 | public static int labelID(final Data data, final String labels) { |
| 119 | for(final byte[] key : Token.split(Token.token(labels), ',')) { |
| 120 | final int id = data.attrNames.index(key); |
| 121 | if(id > 0) return id; |
| 122 | } |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Returns the size ID of the specified node. |
no test coverage detected