Changed package naming across all examples.
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Creature interface.
|
||||
*
|
||||
*/
|
||||
public interface Creature {
|
||||
|
||||
String getName();
|
||||
|
||||
Size getSize();
|
||||
|
||||
Movement getMovement();
|
||||
|
||||
Color getColor();
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Dragon creature.
|
||||
*
|
||||
*/
|
||||
public class Dragon extends AbstractCreature {
|
||||
|
||||
public Dragon() {
|
||||
super("Dragon", Size.LARGE, Movement.FLYING, Color.RED);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Goblin creature.
|
||||
*
|
||||
*/
|
||||
public class Goblin extends AbstractCreature {
|
||||
|
||||
public Goblin() {
|
||||
super("Goblin", Size.SMALL, Movement.WALKING, Color.GREEN);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* KillerBee creature.
|
||||
*
|
||||
*/
|
||||
public class KillerBee extends AbstractCreature {
|
||||
|
||||
public KillerBee() {
|
||||
super("KillerBee", Size.SMALL, Movement.FLYING, Color.LIGHT);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Octopus creature.
|
||||
*
|
||||
*/
|
||||
public class Octopus extends AbstractCreature {
|
||||
|
||||
public Octopus() {
|
||||
super("Octopus", Size.NORMAL, Movement.SWIMMING, Color.DARK);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Shark creature.
|
||||
*
|
||||
*/
|
||||
public class Shark extends AbstractCreature {
|
||||
|
||||
public Shark() {
|
||||
super("Shark", Size.NORMAL, Movement.SWIMMING, Color.LIGHT);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.iluwatar.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Troll creature.
|
||||
*
|
||||
*/
|
||||
public class Troll extends AbstractCreature {
|
||||
|
||||
public Troll() {
|
||||
super("Troll", Size.LARGE, Movement.WALKING, Color.DARK);
|
||||
}
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
package com.iluwatar.app;
|
||||
package com.iluwatar.specification.app;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.iluwatar.creature.Creature;
|
||||
import com.iluwatar.creature.Dragon;
|
||||
import com.iluwatar.creature.Goblin;
|
||||
import com.iluwatar.creature.KillerBee;
|
||||
import com.iluwatar.creature.Octopus;
|
||||
import com.iluwatar.creature.Shark;
|
||||
import com.iluwatar.creature.Troll;
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.selector.ColorSelector;
|
||||
import com.iluwatar.selector.MovementSelector;
|
||||
import com.iluwatar.specification.creature.Creature;
|
||||
import com.iluwatar.specification.creature.Dragon;
|
||||
import com.iluwatar.specification.creature.Goblin;
|
||||
import com.iluwatar.specification.creature.KillerBee;
|
||||
import com.iluwatar.specification.creature.Octopus;
|
||||
import com.iluwatar.specification.creature.Shark;
|
||||
import com.iluwatar.specification.creature.Troll;
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.selector.ColorSelector;
|
||||
import com.iluwatar.specification.selector.MovementSelector;
|
||||
|
||||
/**
|
||||
*
|
@ -1,8 +1,8 @@
|
||||
package com.iluwatar.creature;
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.property.Size;
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
@ -0,0 +1,21 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Creature interface.
|
||||
*
|
||||
*/
|
||||
public interface Creature {
|
||||
|
||||
String getName();
|
||||
|
||||
Size getSize();
|
||||
|
||||
Movement getMovement();
|
||||
|
||||
Color getColor();
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Dragon creature.
|
||||
*
|
||||
*/
|
||||
public class Dragon extends AbstractCreature {
|
||||
|
||||
public Dragon() {
|
||||
super("Dragon", Size.LARGE, Movement.FLYING, Color.RED);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Goblin creature.
|
||||
*
|
||||
*/
|
||||
public class Goblin extends AbstractCreature {
|
||||
|
||||
public Goblin() {
|
||||
super("Goblin", Size.SMALL, Movement.WALKING, Color.GREEN);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* KillerBee creature.
|
||||
*
|
||||
*/
|
||||
public class KillerBee extends AbstractCreature {
|
||||
|
||||
public KillerBee() {
|
||||
super("KillerBee", Size.SMALL, Movement.FLYING, Color.LIGHT);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Octopus creature.
|
||||
*
|
||||
*/
|
||||
public class Octopus extends AbstractCreature {
|
||||
|
||||
public Octopus() {
|
||||
super("Octopus", Size.NORMAL, Movement.SWIMMING, Color.DARK);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Shark creature.
|
||||
*
|
||||
*/
|
||||
public class Shark extends AbstractCreature {
|
||||
|
||||
public Shark() {
|
||||
super("Shark", Size.NORMAL, Movement.SWIMMING, Color.LIGHT);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.iluwatar.specification.creature;
|
||||
|
||||
import com.iluwatar.specification.property.Color;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* Troll creature.
|
||||
*
|
||||
*/
|
||||
public class Troll extends AbstractCreature {
|
||||
|
||||
public Troll() {
|
||||
super("Troll", Size.LARGE, Movement.WALKING, Color.DARK);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.iluwatar.property;
|
||||
package com.iluwatar.specification.property;
|
||||
|
||||
/**
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package com.iluwatar.property;
|
||||
package com.iluwatar.specification.property;
|
||||
|
||||
/**
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package com.iluwatar.property;
|
||||
package com.iluwatar.specification.property;
|
||||
|
||||
/**
|
||||
*
|
@ -1,9 +1,9 @@
|
||||
package com.iluwatar.selector;
|
||||
package com.iluwatar.specification.selector;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.iluwatar.creature.Creature;
|
||||
import com.iluwatar.property.Color;
|
||||
import com.iluwatar.specification.creature.Creature;
|
||||
import com.iluwatar.specification.property.Color;
|
||||
|
||||
/**
|
||||
*
|
@ -1,9 +1,9 @@
|
||||
package com.iluwatar.selector;
|
||||
package com.iluwatar.specification.selector;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.iluwatar.creature.Creature;
|
||||
import com.iluwatar.property.Movement;
|
||||
import com.iluwatar.specification.creature.Creature;
|
||||
import com.iluwatar.specification.property.Movement;
|
||||
|
||||
/**
|
||||
*
|
@ -1,9 +1,9 @@
|
||||
package com.iluwatar.selector;
|
||||
package com.iluwatar.specification.selector;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.iluwatar.creature.Creature;
|
||||
import com.iluwatar.property.Size;
|
||||
import com.iluwatar.specification.creature.Creature;
|
||||
import com.iluwatar.specification.property.Size;
|
||||
|
||||
/**
|
||||
*
|
@ -1,8 +1,8 @@
|
||||
package com.iluwatar.app;
|
||||
package com.iluwatar.specification.app;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.iluwatar.app.App;
|
||||
import com.iluwatar.specification.app.App;
|
||||
|
||||
public class AppTest {
|
||||
|
Reference in New Issue
Block a user