Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hashtable  RSS feed

 
Brian Heisler
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write a Listener Interface that will accept a Hashtable using sockets...where do I begin?
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
interface MyListener extends EventListener {
void eventHappened(MyEvent event);
}
public class MyEvent extends EventObject {
public MyEvent(Object source) {
super(source);
}
Hashtable getHashTable() {
....
....
}
}
public class EventProducer {
...
...
public void addMyListener(MyListener l) {
...
}
public void removeMyListener(MyListener l) {
...
}
}
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!