Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | 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
 
30
	/**
31
	 * 
32
	 * @return value
33
	 */
34
	public String getValue() {
35
		return this.value;
36
	}
79 naveen 37
 
38
	/**
81 naveen 39
	 * True if value attribute is same
79 naveen 40
	 */
41
	public boolean equals(Object obj) {
42
		if(this.value != null && obj instanceof PrimitiveDataObject) {
43
			return this.value.equals(((PrimitiveDataObject)obj).getValue());
44
		}
45
 
46
		return false;
47
	}
20 naveen 48
 
49
	/* (non-Javadoc)
50
	 * @see java.lang.Object#toString()
51
	 */
52
	@Override
53
	public String toString() {
54
		return "PrimitiveDataObject [value=" + value + "]";
55
	}
56
 
10 shop2020 57
}