Skip to content

gogog22510/JavaTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

JavaTool

Some useful tool written in java

Callback Support

Simple Proxy class to avoid writing for loop to trigger multiple callbacks/listeners 

Before

// onMessage1()
for(Callback cb: callbackList) {
  cb.onMessage1();
}

// onMessage2()
for(Callback cb: callbackList) {
  cb.onMessage2();
}

Now

Callback cb = (Callback) proxyClass.getMulticaster();

// onMessage1()
cb.onMessage1();

// onMessage2()
cb.onMessage2();

About

Some useful tool written in java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages