Project

General

Profile

« Previous | Next » 

Revision 541f08b0

Added by Katja Luther almost 8 years ago

remove updateSortindex and move removeNullValues to the mergeListener

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PolytomousKeyNode.java
425 425
	 * <i>this</i> feature node.
426 426
	 */
427 427
	public List<PolytomousKeyNode> getChildren() {
428
	    HHH_9751_Util.removeAllNull(children);
429
	    updateSortIndex();
428

  
430 429
		return children;
431 430
	}
432 431

  
......
466 465
		if (index < 0 || index > children.size() + 1) {
467 466
			throw new IndexOutOfBoundsException("Wrong index: " + index);
468 467
		}
469
		HHH_9751_Util.removeAllNull(children);
470
		updateSortIndex();
471

  
472 468
		if(nodeNumber == null) {
473 469
            	nodeNumber = getMaxNodeNumberFromRoot() + 1;
474 470
        }
......
496 492
	 * @see #removeChild(int)
497 493
	 */
498 494
	public void removeChild(PolytomousKeyNode child) {
499
		HHH_9751_Util.removeAllNull(children);
500
		updateSortIndex();
501
		int index = children.indexOf(child);
495
	    int index = children.indexOf(child);
502 496
		if (index >= 0) {
503 497
			removeChild(index);
504 498
		}
......
895 889
        }
896 890
    }
897 891

  
892
    public void removeNullValueFromChildren(){
893
        HHH_9751_Util.removeAllNull(children);
894
        updateSortIndex();
895
    }
896

  
898 897

  
899 898
}

Also available in: Unified diff