@@ -54,8 +54,8 @@ public class TypeAutomaton implements Automaton {
5454 * modules)
5555 */
5656 public TypeAutomaton (int automataBound , int inputBranching , int outputBranching ) {
57- memoryTypesAutomaton = new ArrayList <Block >();
58- usedTypesAutomaton = new ArrayList <Block >();
57+ memoryTypesAutomaton = new ArrayList <>();
58+ usedTypesAutomaton = new ArrayList <>();
5959 nullState = new State (null , null , -1 , inputBranching , outputBranching );
6060
6161 automataBound = automataBound < 1 ? 1 : automataBound ;
@@ -105,7 +105,7 @@ public List<Block> getMemoryTypesBlocks() {
105105 * @return Blocks of data types used by tools.
106106 */
107107 public List <Block > getAllBlocks () {
108- List <Block > allBlocks = new ArrayList <Block >(usedTypesAutomaton );
108+ List <Block > allBlocks = new ArrayList <>(usedTypesAutomaton );
109109 allBlocks .addAll (memoryTypesAutomaton );
110110 return allBlocks ;
111111 }
@@ -224,7 +224,7 @@ public Block getMemoryTypesBlock(int i) {
224224 * @return List of memory States.
225225 */
226226 public List <State > getMemoryStatesUntilBlockNo (int maxBlockNo ) {
227- List <State > untilStates = new ArrayList <State >();
227+ List <State > untilStates = new ArrayList <>();
228228 for (int i = 0 ; i <= maxBlockNo && i < this .usedTypesAutomaton .size (); i ++) {
229229 Block currBlock = this .getMemoryTypesBlock (i );
230230 for (State currState : currBlock .getStates ()) {
@@ -244,7 +244,7 @@ public List<State> getMemoryStatesUntilBlockNo(int maxBlockNo) {
244244 * @return List of Type States.
245245 */
246246 public List <State > getAllStatesUntilBlockNo (int maxBlockNo ) {
247- List <State > untilStates = new ArrayList <State >();
247+ List <State > untilStates = new ArrayList <>();
248248 for (int i = 0 ; i <= maxBlockNo && i < this .usedTypesAutomaton .size (); i ++) {
249249 Block currBlock = this .usedTypesAutomaton .get (i );
250250 for (State currState : currBlock .getStates ()) {
@@ -268,7 +268,7 @@ public List<State> getAllStatesUntilBlockNo(int maxBlockNo) {
268268 * @return List of Memory Type States.
269269 */
270270 public List <State > getAllMemoryStatesUntilBlockNo (int maxBlockNo ) {
271- List <State > untilStates = new ArrayList <State >();
271+ List <State > untilStates = new ArrayList <>();
272272 for (int i = 0 ; i <= maxBlockNo && i < this .usedTypesAutomaton .size (); i ++) {
273273 Block currBlock = this .memoryTypesAutomaton .get (i );
274274 for (State currState : currBlock .getStates ()) {
@@ -287,7 +287,7 @@ public List<State> getAllMemoryStatesUntilBlockNo(int maxBlockNo) {
287287 * @return List of memory States.
288288 */
289289 public List <State > getMemoryStatesAfterBlockNo (int minBlockNo ) {
290- List <State > afterStates = new ArrayList <State >();
290+ List <State > afterStates = new ArrayList <>();
291291 for (int i = minBlockNo + 1 ; i < this .memoryTypesAutomaton .size (); i ++) {
292292 Block currBlock = this .getMemoryTypesBlock (i );
293293 for (State currState : currBlock .getStates ()) {
@@ -307,7 +307,7 @@ public List<State> getMemoryStatesAfterBlockNo(int minBlockNo) {
307307 * @return List of Used States.
308308 */
309309 public List <State > getUsedStatesAfterBlockNo (int minBlockNo ) {
310- List <State > afterStates = new ArrayList <State >();
310+ List <State > afterStates = new ArrayList <>();
311311 for (int i = minBlockNo + 1 ; i < this .usedTypesAutomaton .size (); i ++) {
312312 Block currBlock = this .usedTypesAutomaton .get (i );
313313 for (State currState : currBlock .getStates ()) {
@@ -324,7 +324,7 @@ public List<State> getUsedStatesAfterBlockNo(int minBlockNo) {
324324 */
325325 @ Override
326326 public List <State > getAllStates () {
327- List <State > allStates = new ArrayList <State >();
327+ List <State > allStates = new ArrayList <>();
328328 for (Block currBlock : getAllBlocks ()) {
329329 for (State currState : currBlock .getStates ()) {
330330 allStates .add (currState );
@@ -339,7 +339,7 @@ public List<State> getAllStates() {
339339 * @return List of memory type states.
340340 */
341341 public List <State > getAllMemoryTypesStates () {
342- List <State > allMemoryStates = new ArrayList <State >();
342+ List <State > allMemoryStates = new ArrayList <>();
343343 for (Block currBlock : getMemoryTypesBlocks ()) {
344344 for (State currState : currBlock .getStates ()) {
345345 allMemoryStates .add (currState );
@@ -354,7 +354,7 @@ public List<State> getAllMemoryTypesStates() {
354354 * @return List of used type states.
355355 */
356356 public List <State > getAllUsedTypesStates () {
357- List <State > allUsedStates = new ArrayList <State >();
357+ List <State > allUsedStates = new ArrayList <>();
358358 for (Block currBlock : getUsedTypesBlocks ()) {
359359 for (State currState : currBlock .getStates ()) {
360360 allUsedStates .add (currState );
0 commit comments