VarIndexing { public static VarIndexing all(final int defaultIndex) { checkArgument(defaultIndex >= 0); switch (defaultIndex) { case 0: return ALL_ZERO; case 1: return ALL_ONE; default: return new Builder(defaultIndex).build(); } } private  VarIndexing(final Builder builder); static VarIndexing all(final int defaultIndex); static Builder builder(final int defaultIndex); Builder transform(); VarIndexing inc(final VarDecl<?> varDecl, final int n); VarIndexing inc(final VarDecl<?> varDecl); VarIndexing add(final VarIndexing indexing); VarIndexing sub(final VarIndexing indexing); VarIndexing join(final VarIndexing indexing); int get(final VarDecl<?> varDecl); @Override String toString();  }
@Test public void testAll() { final VarIndexing all0 = VarIndexing.all(0); final VarIndexing all1 = VarIndexing.all(1); assertEquals(0, all0.get(x)); assertEquals(0, all0.get(y)); assertEquals(0, all0.get(z)); assertEquals(1, all1.get(x)); assertEquals(1, all1.get(y)); assertEquals(1, all1.get(z)); }