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 String value type.
8    * @author srlok
9    *
10   */
11  public class StringProperty extends AbstractSharedProperty<String> {
12  	
13  	@SuppressWarnings("rawtypes")
14  	public StringProperty(WorldObjectId objId, String identifier, String value, Class compositeClass)
15  	{
16  		super(objId, identifier, value, compositeClass);
17  	}
18  	
19  	public StringProperty(StringProperty other)
20  	{
21  		super(other);
22  	}
23  
24  	@Override
25  	public ISharedProperty clone() {
26  		return new StringProperty(this);
27  	}
28  
29  	@Override
30  	public Class getPropertyValueClass() {
31  		return String.class;
32  	}
33  
34  	@Override
35  	protected String cloneValue() {
36  		if (this.value == null) return null;
37  		return new String(value);
38  	}
39  		
40  }