Revision 751 trunk/libraries/libIverUtiles/src/com/iver/utiles/XMLEntity.java

View differences:

XMLEntity.java
36 36
	 * @param value valor.
37 37
	 */
38 38
	public void putProperty(String key, String value) {
39
		if ((key == null) || (value == null)) {
39
		if ((key == null)) {
40 40
			return;
41 41
		}
42 42

  
......
55 55
	public void putProperty(String key, Object value) {
56 56
		String ret = "";
57 57

  
58
		if ((key == null) || (value == null)) {
58
		if (key == null) {
59 59
			return;
60 60
		}
61 61

  
......
654 654
		for (int i = 0; i < properties.length; i++) {
655 655
			if (properties[i].getKey().compareTo(key) == 0) {
656 656
				res = Integer.parseInt(properties[i].getValue());
657
				exists=true;
657 658
			}
658 659
		}
659 660

  
......
852 853

  
853 854
		xmltag.addProperty(p);
854 855
	}
856
	public boolean contains(String key) {
857
		Property[] properties = xmltag.getProperty();
858
		boolean exists = false;
859

  
860
		for (int i = 0; i < properties.length; i++) {
861
			if (properties[i].getKey().compareTo(key) == 0) {
862
				exists = true;
863
			}
864
		}
865
		return exists;
866
	}
855 867
}

Also available in: Unified diff