// Path: lib/src/main/java/tk/zielony/randomdata/DataContext.java
// public class DataContext {
// 
//     private static final String LOCALE = "locale";
//     public static final String NAME = "name";
// 
//     protected final List<Map<String, Object>> stack = new ArrayList<>();
// 
//     void save() {
//         HashMap<String, Object> contextData = (HashMap<String, Object>) stack.get(stack.size() - 1);
//         HashMap<String, Object> clone = (HashMap<String, Object>) contextData.clone();
//         stack.add(clone);
//     }
// 
//     public DataContext() {
//         stack.add(new HashMap<>());
//     }
// 
//     void restore() {
//         stack.remove(stack.size() - 1);
//     }
// 
//     public <Type> Type get(String key) {
//         return (Type) stack.get(stack.size() - 1).get(key);
//     }
// 
//     public <Type> void set(String key, Type value) {
//         stack.get(stack.size() - 1).put(key, value);
//     }
// }
// 
// Path: lib/src/main/java/tk/zielony/randomdata/Generator.java
// public abstract class Generator<Type> implements SimpleGenerator<Type> {
//     private Matcher matcher;
// 
//     protected Matcher getDefaultMatcher() {
//         return f -> true;
//     }
// 
//     public Generator<Type> withMatcher(Matcher matcher) {
//         this.matcher = matcher;
//         return this;
//     }
// 
//     public <OutType> GeneratorWithTransformer<Type, OutType> withTransformer(Transformer<Type, OutType> transformer) {
//         return new GeneratorWithTransformer<>(this, transformer);
//     }
// 
//     protected boolean match(Target target) {
//         if (matcher == null)
//             matcher = getDefaultMatcher();
//         return matcher.matches(target);
//     }
// 
//     public Type next() {
//         return next(null);
//     }
// 
//     public abstract Type next(@Nullable DataContext context);
// 
//     public void reset() {
//     }
// }
// 
// Path: lib/src/main/java/tk/zielony/randomdata/Matcher.java
// public interface Matcher {
//     boolean matches(Target target);
// }


import tk.zielony.randomdata.DataContext;
import tk.zielony.randomdata.Generator;
import tk.zielony.randomdata.Matcher;
package tk.zielony.randomdata.common;


public class TextGenerator extends Generator<String> {
    private static String[] loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat, purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat. ".split("\\. ");
    private int sentences;
    private boolean useSequence;
    private int sequence;

    public TextGenerator() {
        sentences = 1;
        useSequence = true;
    }

    public TextGenerator(int sentences, boolean useSequence) {
        this.sentences = sentences;
        this.useSequence = useSequence;
    }

    @Override
    protected Matcher getDefaultMatcher() {
        return f -> f.getName() != null && (f.getName().contains("description") || f.getName().contains("text"));
    }

    @Override
// Path: lib/src/main/java/tk/zielony/randomdata/DataContext.java
// public class DataContext {
// 
//     private static final String LOCALE = "locale";
//     public static final String NAME = "name";
// 
//     protected final List<Map<String, Object>> stack = new ArrayList<>();
// 
//     void save() {
//         HashMap<String, Object> contextData = (HashMap<String, Object>) stack.get(stack.size() - 1);
//         HashMap<String, Object> clone = (HashMap<String, Object>) contextData.clone();
//         stack.add(clone);
//     }
// 
//     public DataContext() {
//         stack.add(new HashMap<>());
//     }
// 
//     void restore() {
//         stack.remove(stack.size() - 1);
//     }
// 
//     public <Type> Type get(String key) {
//         return (Type) stack.get(stack.size() - 1).get(key);
//     }
// 
//     public <Type> void set(String key, Type value) {
//         stack.get(stack.size() - 1).put(key, value);
//     }
// }
// 
// Path: lib/src/main/java/tk/zielony/randomdata/Generator.java
// public abstract class Generator<Type> implements SimpleGenerator<Type> {
//     private Matcher matcher;
// 
//     protected Matcher getDefaultMatcher() {
//         return f -> true;
//     }
// 
//     public Generator<Type> withMatcher(Matcher matcher) {
//         this.matcher = matcher;
//         return this;
//     }
// 
//     public <OutType> GeneratorWithTransformer<Type, OutType> withTransformer(Transformer<Type, OutType> transformer) {
//         return new GeneratorWithTransformer<>(this, transformer);
//     }
// 
//     protected boolean match(Target target) {
//         if (matcher == null)
//             matcher = getDefaultMatcher();
//         return matcher.matches(target);
//     }
// 
//     public Type next() {
//         return next(null);
//     }
// 
//     public abstract Type next(@Nullable DataContext context);
// 
//     public void reset() {
//     }
// }
// 
// Path: lib/src/main/java/tk/zielony/randomdata/Matcher.java
// public interface Matcher {
//     boolean matches(Target target);
// }


// Path: lib/src/main/java/tk/zielony/randomdata/common/TextGenerator.java
import tk.zielony.randomdata.DataContext;
import tk.zielony.randomdata.Generator;
import tk.zielony.randomdata.Matcher;

package tk.zielony.randomdata.common;


public class TextGenerator extends Generator<String> {
    private static String[] loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat, purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue. Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat. ".split("\\. ");
    private int sentences;
    private boolean useSequence;
    private int sequence;

    public TextGenerator() {
        sentences = 1;
        useSequence = true;
    }

    public TextGenerator(int sentences, boolean useSequence) {
        this.sentences = sentences;
        this.useSequence = useSequence;
    }

    @Override
    protected Matcher getDefaultMatcher() {
        return f -> f.getName() != null && (f.getName().contains("description") || f.getName().contains("text"));
    }

    @Override
    public String next(DataContext context) {