@Test public void testGetBooleanTag() throws Exception { Type classType = modelIndex.getType(CLASSTYPE_ID); assertEquals(STRING_VALUE, TaggedValueHelper.getStringTag(TAG_DEFINITION_NAME, classType, modelIndex, "")); assertEquals(DEFAULT_VALUE, TaggedValueHelper.getStringTag(RANDOM_TAG_NAME, classType, modelIndex, DEFAULT_VALUE)); }
public static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup, final boolean defaultValue) { for (final TaggedValue taggedValue : element.getTaggedValues()) { final TagDefinition tagDefinition = lookup.getTagDefinition(taggedValue.getTagDefinition()); if (name.equals(tagDefinition.getName())) { return Boolean.valueOf(taggedValue.getValue()); } } return defaultValue; }
TaggedValueHelper { public static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup, final boolean defaultValue) { for (final TaggedValue taggedValue : element.getTaggedValues()) { final TagDefinition tagDefinition = lookup.getTagDefinition(taggedValue.getTagDefinition()); if (name.equals(tagDefinition.getName())) { return Boolean.valueOf(taggedValue.getValue()); } } return defaultValue; } }
TaggedValueHelper { public static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup, final boolean defaultValue) { for (final TaggedValue taggedValue : element.getTaggedValues()) { final TagDefinition tagDefinition = lookup.getTagDefinition(taggedValue.getTagDefinition()); if (name.equals(tagDefinition.getName())) { return Boolean.valueOf(taggedValue.getValue()); } } return defaultValue; }  }
TaggedValueHelper { public static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup, final boolean defaultValue) { for (final TaggedValue taggedValue : element.getTaggedValues()) { final TagDefinition tagDefinition = lookup.getTagDefinition(taggedValue.getTagDefinition()); if (name.equals(tagDefinition.getName())) { return Boolean.valueOf(taggedValue.getValue()); } } return defaultValue; }  static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup,
            final boolean defaultValue); static final String getStringTag(final String name, final Taggable element, final ModelIndex lookup,
            final String defaultValue); static final boolean hasTag(final String name, final Taggable element, final ModelIndex lookup); }
TaggedValueHelper { public static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup, final boolean defaultValue) { for (final TaggedValue taggedValue : element.getTaggedValues()) { final TagDefinition tagDefinition = lookup.getTagDefinition(taggedValue.getTagDefinition()); if (name.equals(tagDefinition.getName())) { return Boolean.valueOf(taggedValue.getValue()); } } return defaultValue; }  static final boolean getBooleanTag(final String name, final Taggable element, final ModelIndex lookup,
            final boolean defaultValue); static final String getStringTag(final String name, final Taggable element, final ModelIndex lookup,
            final String defaultValue); static final boolean hasTag(final String name, final Taggable element, final ModelIndex lookup);  }