/*
 * Copyright (C) 2010-2016 Christian Gleissner
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.behaim.builder.config;

public class FieldConfig {

    private int maxLength = 10;
    private int maxValue = Integer.MAX_VALUE;
    private int minLength = 3;
    private int minValue = 0;
    private boolean random = true;
    // TODO gleissc Add support for unique random values, then expose this field
    private final boolean unique = false;

    public FieldConfig() {
        super();
    }

    public FieldConfig(boolean random, int minValue, int maxValue, int minLength, int maxLength) {
        super();
        this.random = random;
        this.minValue = minValue;
        this.maxValue = maxValue;
        this.minLength = minLength;
        this.maxLength = maxLength;
    }

    public int getMaxLength() {
        return maxLength;
    }

    public int getMaxValue() {
        return maxValue;
    }

    public int getMinLength() {
        return minLength;
    }

    public int getMinValue() {
        return minValue;
    }

    public boolean isConstantValue() {
        return minValue == maxValue;
    }

    public boolean isRandom() {
        return random;
    }

    public boolean isUnique() {
        return unique;
    }
}

@@ -680,24 +680,30 @@
     private 
+final 
 int maxLengt
@@ -707,13 +707,8 @@
 ngth
- = 10
 ;%0A  
@@ -713,24 +713,30 @@
     private 
+final 
 int maxValue
@@ -739,28 +739,8 @@
 alue
- = Integer.MAX_VALUE
 ;%0A  
@@ -745,24 +745,30 @@
     private 
+final 
 int minLengt
@@ -772,12 +772,8 @@
 ngth
- = 3
 ;%0A  
@@ -782,16 +782,22 @@
 private 
+final 
 int minV
@@ -804,12 +804,8 @@
 alue
- = 0
 ;%0A  
@@ -814,16 +814,22 @@
 private 
+final 
 boolean 
@@ -838,15 +838,8 @@
 ndom
- = true
 ;%0A  
@@ -991,30 +991,62 @@
 ) %7B%0A        
-super(
+this(true, 0, Integer.MAX_VALUE, 3, 10
 );%0A    %7D%0A%0A  
@@ -1146,25 +1146,8 @@
 ) %7B%0A
-        super();%0A
     

Mark FieldConfig attributes as final.