Subversion Repositories SmartDukaan

Rev

Rev 1061 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 shop2020 1
/**
2
 * 
3
 */
4
package in.shop2020.metamodel.core;
5
 
6
/**
45 naveen 7
 * Atomic fact about a Bullet. Integers, floats and booleans are stored in Java
8
 * String.
9
 * 
10 shop2020 10
 * @author naveen
11
 *
12
 */
13
public class PrimitiveDataObject extends BulletDataObject {
14
 
15
	/**
16
	 * 
17
	 */
18
	private static final long serialVersionUID = 1L;
19
	private String value;
20
 
21
	/**
22
	 * 
23
	 * @param value
24
	 */
25
	public PrimitiveDataObject(String value) {
26
		super();
27
		this.value = value;
28
	}
29
 
8764 amit.gupta 30
	PrimitiveDataObject() {
31
	}
32
 
10 shop2020 33
	/**
34
	 * 
35
	 * @return value
36
	 */
37
	public String getValue() {
38
		return this.value;
39
	}
79 naveen 40
 
41
	/**
81 naveen 42
	 * True if value attribute is same
79 naveen 43
	 */
44
	public boolean equals(Object obj) {
45
		if(this.value != null && obj instanceof PrimitiveDataObject) {
46
			return this.value.equals(((PrimitiveDataObject)obj).getValue());
47
		}
48
 
49
		return false;
50
	}
20 naveen 51
 
52
	/* (non-Javadoc)
53
	 * @see java.lang.Object#toString()
54
	 */
55
	@Override
56
	public String toString() {
57
		return "PrimitiveDataObject [value=" + value + "]";
58
	}
59
 
10 shop2020 60
}