#502 Reverted changes in composite example, due to nature of this example using logger isn't good idea
This commit is contained in:
parent
0438811489
commit
27d6d500bc
@ -22,18 +22,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.iluwatar.composite;
|
package com.iluwatar.composite;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Letter
|
* Letter
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Letter extends LetterComposite {
|
public class Letter extends LetterComposite {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(Letter.class);
|
|
||||||
|
|
||||||
private char c;
|
private char c;
|
||||||
|
|
||||||
public Letter(char c) {
|
public Letter(char c) {
|
||||||
@ -42,7 +37,7 @@ public class Letter extends LetterComposite {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void printThisBefore() {
|
protected void printThisBefore() {
|
||||||
LOGGER.info(String.valueOf(c));
|
System.out.print(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,20 +22,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.iluwatar.composite;
|
package com.iluwatar.composite;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Sentence
|
* Sentence
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Sentence extends LetterComposite {
|
public class Sentence extends LetterComposite {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(Sentence.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@ -52,6 +47,6 @@ public class Sentence extends LetterComposite {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void printThisAfter() {
|
protected void printThisAfter() {
|
||||||
LOGGER.info(".");
|
System.out.print(".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,20 +22,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.iluwatar.composite;
|
package com.iluwatar.composite;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Word
|
* Word
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Word extends LetterComposite {
|
public class Word extends LetterComposite {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(Word.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@ -47,7 +42,7 @@ public class Word extends LetterComposite {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void printThisBefore() {
|
protected void printThisBefore() {
|
||||||
LOGGER.info(" ");
|
System.out.print(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user