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.communication.worldview.object.ISharedProperty;
5   
6   /**
7    * Implementation of the ISharedProperty interface for Integer value type.
8    * <p><p>
9    * For the sake of simplicity of GB2004 protocol message definition.
10   * <p><p>
11   * Effectively the same as {@link IntegerProperty}.
12   * 
13   * @author Jimmy
14   *
15   */
16  public class IntProperty extends AbstractSharedProperty<Integer> {
17  	
18  	@SuppressWarnings("rawtypes")
19  	public IntProperty(WorldObjectId objId, String identifier, Integer value, Class compositeClass)
20  	{
21  		super(objId, identifier, value, compositeClass);
22  	}
23  	
24  	public IntProperty(IntProperty other)
25  	{
26  		super(other);
27  	}
28  
29  	@Override
30  	public ISharedProperty clone() {
31  		return new IntProperty(this);
32  	}
33  
34  	@Override
35  	public Class getPropertyValueClass() {
36  		return Integer.class;
37  	}
38  
39  	@Override
40  	protected Integer cloneValue() {
41  		if (this.value == null) return null;
42  		return new Integer(value);
43  	}
44  		
45  }