MCPcopy Create free account
hub / github.com/PCGen/pcgen / getUniqueListFor

Method getUniqueListFor

code/src/java/pcgen/cdom/base/CDOMObject.java:593–605  ·  view source on GitHub ↗

Returns a non-null Set of the objects stored in this CDOMObject for the given ListKey. The List is converted to a Set to ensure that each entry in the List is only occurs once. This is used because the loading system cannot guarantee "Set" behavior (cannot guarantee uniqueness), and a specific infr

(ListKey<T> key)

Source from the content-addressed store, hash-verified

591 * given key.
592 */
593 public final <T extends Comparable<T>> Set<T> getUniqueListFor(ListKey<T> key)
594 {
595 if (listChar == null)
596 {
597 return new HashSet<>();
598 }
599 List<T> list = listChar.getListFor(key);
600 if (list == null)
601 {
602 return new HashSet<>();
603 }
604 return new LinkedHashSet<>(list);
605 }
606
607 public final String getListAsString(ListKey<?> key)
608 {

Callers 2

getSkillMethod · 0.80
processCountMethod · 0.80

Calls 1

getListForMethod · 0.65

Tested by

no test coverage detected