Advertisement
wingman007

Java2014_Notifier

Dec 15th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package nestedlocalanonymouslambdaevents;
  7.  
  8. /**
  9.  *
  10.  * @author Kristiqn
  11.  */
  12. public class Notifier {
  13.    
  14.     public MyEventHandler onSomething;
  15.    
  16.     public void doSomething() {
  17.         System.out.println("doSOmehitng was called.");
  18.        
  19.         // trigger the event
  20.         if (onSomething != null) {
  21.             onSomething.happend(this);
  22.         }
  23.        
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement