View Javadoc

1   package cz.cuni.amis.pogamut.multi.communication.worldview.property;
2   
3   import cz.cuni.amis.pogamut.base.communication.worldview.object.WorldObjectId;
4   import cz.cuni.amis.pogamut.multi.agent.ITeamId;
5   import cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedPropertyUpdateResult;
6   import cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedPropertyUpdatedEvent;
7   import cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedPropertyUpdateResult.Result;
8   import cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty;
9   import cz.cuni.amis.utils.exception.PogamutException;
10  
11  /**
12   * Implementation of the ISharedProperty interface for boolean value type.
13   * @author srlok
14   *
15   */
16  public class BooleanProperty extends AbstractSharedProperty<Boolean> {
17  	
18  	@SuppressWarnings("rawtypes")
19  	public BooleanProperty(WorldObjectId objId, String identifier, Boolean value, Class compositeClass)
20  	{
21  		super(objId, identifier, value, compositeClass);
22  	}
23  	
24  	public BooleanProperty(BooleanProperty other)
25  	{
26  		super(other);
27  	}
28  
29  	
30  	
31  	@Override
32  	public ISharedProperty clone() {
33  		return new BooleanProperty(this);
34  	}
35  
36  	@Override
37  	public Class getPropertyValueClass() {
38  		return Boolean.class;
39  	}
40  
41  	@Override
42  	protected Boolean cloneValue() {
43  		if (this.value == null) return null;
44  		return new Boolean(value);
45  	}
46  		
47  }