Created
November 15, 2016 22:02
-
-
Save volkov/2431b5f4afbbea566e09a5085e326472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.yandex.qe.metrics.join.impl; | |
import java.util.Date; | |
import jdk.nashorn.internal.runtime.regexp.joni.Config; | |
/** | |
* User: serg-v | |
* Date: 11/15/16 | |
* Time: 11:48 PM | |
*/ | |
public class FunctionProperty { | |
private static FunctionProperty instance; | |
private final Date dateFrom; | |
private final Date dateTo; | |
public FunctionProperty(final Date dateFrom, final Date dateTo) { | |
this.dateFrom = dateFrom; | |
this.dateTo = dateTo; | |
} | |
public static FunctionProperty getInstance() { | |
return instance; | |
} | |
public static void setDate(Date dateFrom, Date dateTo) { | |
FunctionProperty.instance = new FunctionProperty(dateFrom, dateTo); | |
} | |
public static void main(String[] args) { | |
Date dateFrom = new Date(args[0]); | |
Date dateTo = new Date(args[1]); | |
setDate(dateFrom, dateTo); | |
doSmth(); | |
} | |
public static void doSmth() { | |
doSmth2(); | |
} | |
private static void doSmth2() { | |
doSmth3(); | |
} | |
private static void doSmth3() { | |
System.out.println(getInstance()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment