samples/singletons/src/org/apidesign/singletons/usage/Main.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 15 Oct 2011 22:11:18 +0200
changeset 376 bb34a70d36ba
parent 345 f497cf8621b3
permissions -rw-r--r--
Shortening lines to less than 75 characters
jtulach@343
     1
package org.apidesign.singletons.usage;
jtulach@343
     2
jtulach@345
     3
// BEGIN: singletons.injectable.usage
jtulach@343
     4
import org.apidesign.singletons.api.DialogDisplayer;
jtulach@343
     5
jtulach@343
     6
public class Main {
jtulach@343
     7
    public static void main(String[] args) {
jtulach@376
     8
        if (DialogDisplayer.getDefault().yesOrNo(
jtulach@376
     9
            "Do you like singletons?"
jtulach@376
    10
        )) {
jtulach@343
    11
            System.err.println("OK, thank you!");
jtulach@343
    12
        } else {
jtulach@343
    13
            System.err.println(
jtulach@376
    14
                "Visit http://singletons.apidesign.org to"
jtulach@376
    15
                + " change your mind!"
jtulach@343
    16
            );
jtulach@343
    17
        }
jtulach@343
    18
    }
jtulach@343
    19
}
jtulach@345
    20
// END: singletons.injectable.usage