@Test public void testIndexedHeaderPrefix() { for (BagOptions options : BagOptions.values()) { for (int i = 0; i < Level.LEVELS; i++) { AtomPrefix prefix = IndexedHeaderPrefix.prefixFor(i, options); assertNotNull(prefix); assertTrue(prefix.isHeader()); assertTrue(prefix.isValid()); assertFalse(prefix.isData()); for (int j = 0; j < Level.LEVELS; j++) { assertEquals(i, prefix.level(j)); } assertEquals(prefix, AtomPrefixes.get(prefix.prefix)); } } for (BagOptions options : BagOptions.values()) { for (int i = -10; i < 0; i++) { assertNull(IndexedHeaderPrefix.prefixFor(i, options)); } for (int i = Level.LEVELS; i < Level.LEVELS + 10; i++) { assertNull(IndexedHeaderPrefix.prefixFor(i, options)); } } }
public static AtomPrefix get(byte prefix) { if (prefix >= 0) { return prefixes[prefix]; } else { return prefixes[256 + prefix]; } }
AtomPrefixes { public static AtomPrefix get(byte prefix) { if (prefix >= 0) { return prefixes[prefix]; } else { return prefixes[256 + prefix]; } } }
AtomPrefixes { public static AtomPrefix get(byte prefix) { if (prefix >= 0) { return prefixes[prefix]; } else { return prefixes[256 + prefix]; } } private  AtomPrefixes(); }
AtomPrefixes { public static AtomPrefix get(byte prefix) { if (prefix >= 0) { return prefixes[prefix]; } else { return prefixes[256 + prefix]; } } private  AtomPrefixes(); static AtomPrefix get(byte prefix); static void main(String[] args); }
AtomPrefixes { public static AtomPrefix get(byte prefix) { if (prefix >= 0) { return prefixes[prefix]; } else { return prefixes[256 + prefix]; } } private  AtomPrefixes(); static AtomPrefix get(byte prefix); static void main(String[] args);  }