Skip to content

Item tree key

Ivan edited this page Nov 22, 2019 · 2 revisions

Item tree key

ItemTreeKey is a key for TestItemTree(wiki) and TestItemLeaf(wiki) items mapping. It contains name and hash fields:

private final String name;
private final int hash;

ItemTreeKey instance can be created using one of methods:

1. public static ItemTreeKey of(String name) {
		return new ItemTreeKey(name);
	}
2. public static ItemTreeKey of(String name, int hash) {
		return new ItemTreeKey(name, hash);
	}

Method #2 allows to provide hash(generated by agent) to prevent clashing ItemTreeKeys created for different TestItems with the same names.