Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
*** BEGIN LICENSE BLOCK ***** Version: MPL 2.0 echocat Jomon, Copyright (c) 2012-2013 echocat This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. *** END LICENSE BLOCK ***** /
package org.echocat.jomon.demo.generator;
import  javax.annotation.Nonnull;
import  javax.annotation.Nullable;
import static org.echocat.jomon.runtime.generation.StringRequirement.UNIQUE_VALUE_PLACE_HOLDER;
public class EmployeeRequirement implements Requirement {
    @Nonnull
    public static EmployeeRequirement employee() {
        return new EmployeeRequirement();
    }
    private StringRequirement _name = new StringRequirement("employee" + );
    private DateRequirement _joined = new ExactDateRequirement(new Date());
    @Nonnull
    public EmployeeRequirement withName(@Nonnull String name) {
         = new StringRequirement(name);
        return this;
    }
    @Nonnull
    public EmployeeRequirement withNamePrefixedBy(@Nonnull String prefixedBy) {
        return withName(prefixedBy + );
    }
    @Nonnull
    public EmployeeRequirement joinedBetween(@Nullable @Including Date from, @Nullable @Excluding Date to) {
         = new DateRangeRequirement(fromto);
        return this;
    }
    @Nonnull
    public EmployeeRequirement joinedBefore(@Nonnull @Excluding Date before) {
        return joinedBetween(nullbefore);
    }
    @Nonnull
    public EmployeeRequirement joinedAfter(@Nonnull @Including Date after) {
        return joinedBetween(afternull);
    }
    @Nonnull
    public EmployeeRequirement joined(@Nonnull Date at) {
         = new ExactDateRequirement(at);
        return this;
    }
    @Nonnull
    public StringRequirement getName() {
        return ;
    }
    @Nonnull
    public DateRequirement getJoined() {
        return ;
    }
New to GrepCode? Check out our FAQ X