@Test public void testStates() { populate(testMap, stateMap1); final int[] states = testMap.states(); Assert.assertEquals(NUM_STATES, states.length); final Set<Integer> uniqueStates = new HashSet<>(); for (final int state : states) { uniqueStates.add(state); } Assert.assertEquals(NUM_STATES, uniqueStates.size()); for (int i = 0; i < NUM_STATES; i++) { Assert.assertTrue(uniqueStates.contains(Integer.valueOf(i))); } }
@Override public int[] states() { final int[] aStates = new int[map.size()]; int i = 0; for (final Integer state : map.keySet()) { aStates[i++] = state; } return aStates; }
StateMap implements IStateMap<S> { @Override public int[] states() { final int[] aStates = new int[map.size()]; int i = 0; for (final Integer state : map.keySet()) { aStates[i++] = state; } return aStates; } }
StateMap implements IStateMap<S> { @Override public int[] states() { final int[] aStates = new int[map.size()]; int i = 0; for (final Integer state : map.keySet()) { aStates[i++] = state; } return aStates; }  }
StateMap implements IStateMap<S> { @Override public int[] states() { final int[] aStates = new int[map.size()]; int i = 0; for (final Integer state : map.keySet()) { aStates[i++] = state; } return aStates; }  @Override IEdgeMap<S> get(final int state_); @Override void optimize(); @Override IEdgeMap<S> put(final int state_, final IEdgeMap<S> edgeMap_); @Override int[] states(); @Override Collection<S> symbols(); }
StateMap implements IStateMap<S> { @Override public int[] states() { final int[] aStates = new int[map.size()]; int i = 0; for (final Integer state : map.keySet()) { aStates[i++] = state; } return aStates; }  @Override IEdgeMap<S> get(final int state_); @Override void optimize(); @Override IEdgeMap<S> put(final int state_, final IEdgeMap<S> edgeMap_); @Override int[] states(); @Override Collection<S> symbols();  }