Comments for observer example.
This commit is contained in:
		@@ -1,5 +1,12 @@
 | 
			
		||||
package com.iluwatar;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Observer pattern defines one-to-many relationship
 | 
			
		||||
 * between objects. The target object sends change
 | 
			
		||||
 * notifications to its registered observers.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class App 
 | 
			
		||||
{
 | 
			
		||||
    public static void main( String[] args )
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,12 @@ package com.iluwatar;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Weather can be observed by implementing WeatherObserver
 | 
			
		||||
 * interface and registering as listener.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class Weather {
 | 
			
		||||
 | 
			
		||||
	private WeatherType currentWeather;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,10 @@
 | 
			
		||||
package com.iluwatar;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Observer interface.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public interface WeatherObserver {
 | 
			
		||||
 | 
			
		||||
	void update(WeatherType currentWeather);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user