All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.snowdrop.istio.api.TimeStampBuilder Maven / Gradle / Ivy

There is a newer version: 1.7.7.1
Show newest version
package me.snowdrop.istio.api;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class TimeStampBuilder extends TimeStampFluentImpl implements VisitableBuilder{

    TimeStampFluent fluent;
    Boolean validationEnabled;

    public TimeStampBuilder(){
            this(true);
    }
    public TimeStampBuilder(Boolean validationEnabled){
            this(new TimeStamp(), validationEnabled);
    }
    public TimeStampBuilder(TimeStampFluent fluent){
            this(fluent, true);
    }
    public TimeStampBuilder(TimeStampFluent fluent,Boolean validationEnabled){
            this(fluent, new TimeStamp(), validationEnabled);
    }
    public TimeStampBuilder(TimeStampFluent fluent,TimeStamp instance){
            this(fluent, instance, true);
    }
    public TimeStampBuilder(TimeStampFluent fluent,TimeStamp instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withNanos(instance.getNanos()); 
            fluent.withSeconds(instance.getSeconds()); 
            this.validationEnabled = validationEnabled; 
    }
    public TimeStampBuilder(TimeStamp instance){
            this(instance,true);
    }
    public TimeStampBuilder(TimeStamp instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withNanos(instance.getNanos()); 
            this.withSeconds(instance.getSeconds()); 
            this.validationEnabled = validationEnabled; 
    }

    public TimeStamp build(){
            TimeStamp buildable = new TimeStamp(fluent.getNanos(),fluent.getSeconds());
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            TimeStampBuilder that = (TimeStampBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy