Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8024
| From | markspace <-@.> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: improvise LatchCounter |
| Date | 2011-09-14 09:44 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <j4qllo$n0s$1@dont-email.me> (permalink) |
| References | <3866cb2e-c182-47ce-b03a-33ec8d906f67@glegroupsg2000goo.googlegroups.com> |
On 9/13/2011 10:40 PM, Asit Dhal wrote:
> Here, I have made a small utility class which sorts the sample data.
> I want to generalize the class by means of an external
> function(something like call back function). Please suggest me how to
> do this ?
Normally in Java you make a callback with an interface
public interface Sort {
void sort();
}
Then provide implementations for it:
public class BubbleSort implements Sort {
public void sort() {
.. sort here with bubble method..
}
}
If you can be more specific what you are trying to do, it might help us
answer your question better.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
improvise LatchCounter Asit Dhal <lipun4u@gmail.com> - 2011-09-13 22:40 -0700
Re: improvise LatchCounter markspace <-@.> - 2011-09-14 09:44 -0700
Re: improvise LatchCounter Asit Dhal <lipun4u@gmail.com> - 2011-09-14 11:12 -0700
Re: improvise LatchCounter markspace <-@.> - 2011-09-14 12:46 -0700
Re: improvise LatchCounter Roedy Green <see_website@mindprod.com.invalid> - 2011-09-14 11:52 -0700
csiph-web