package com.turlir.abakgists.view.anim.factor;

import android.view.View;

import com.turlir.abakgists.view.anim.base.AnimationCreator;
import com.turlir.abakgists.view.anim.base.Factory;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractFactoryOfThree
        extends Factory {

    @Override
    protected List<AnimationCreator> create(View... views) {
        if (views.length > 3) {
            throw new IllegalArgumentException();
        }

        List<AnimationCreator> res = new ArrayList<>(3);
        for (int i = 0; i < 3; i++) {
            if (views.length > i) {
                switch (i) {
                    case 0:
                        res.add(first(views[i]));
                        break;
                    case 1:
                        res.add(second(views[i]));
                        break;
                    case 2:
                        res.add(three(views[i]));
                        break;
                }
            } else {
                break;
            }
        }
        return res;
    }

    public abstract AnimationCreator first(View v);

    public abstract AnimationCreator second(View v);

    public abstract AnimationCreator three(View v);
}

@@ -234,23 +234,16 @@
 .List;%0A%0A
-public 
 abstract
@@ -299,16 +299,58 @@
 tory %7B%0A%0A
+    private static final int LENGTH = 3;%0A%0A
     @Ove
@@ -433,24 +433,41 @@
 f (views
+ == null %7C%7C views
 .length 
 %3E 3) %7B%0A 
@@ -458,17 +458,18 @@
 .length 
-%3E
+!=
  3) %7B%0A  
@@ -580,17 +580,22 @@
 yList%3C%3E(
-3
+LENGTH
 );%0A     
@@ -617,17 +617,22 @@
  0; i %3C 
-3
+LENGTH
 ; i++) %7B
@@ -636,48 +636,8 @@
 ) %7B%0A
-            if (views.length %3E i) %7B%0A    
     
@@ -677,20 +677,16 @@
     
-   
- 
 case 0:%0A
     
@@ -681,20 +681,16 @@
 case 0:%0A
-    
         
@@ -739,36 +739,32 @@
                 
-    
 break;%0A         
@@ -774,20 +774,16 @@
     
- 
-   
 case 1:%0A
     
@@ -778,20 +778,16 @@
 case 1:%0A
-    
         
@@ -841,39 +841,31 @@
             
-  
-  
 break;%0A
-    
             
@@ -876,20 +876,16 @@
 case 2:%0A
-    
         
@@ -930,74 +930,8 @@
     
-                    break;%0A                %7D%0A            %7D else %7B%0A
     

fix code