Evaluate Properties
@param type
@param tag
@param value
@return
512122
private boolean props(Pair<String, Pair<HttpCode<TRANS,?>, List<Pair<String, Object>>>> type, String tag, String value) {
		boolean rv = false;
		if(type.y!=null) {
			for(Pair<String,Object> prop : type.y.y){
				if(tag.equals(prop.x)) {
					if(tag.equals("charset")) {
						return prop.x==null?false:prop.y.equals(value.toLowerCase()); // return True if Matched
					} else if(tag.equals("version")) {
						return prop.y.equals(new Version(value)); // Note: Version Class knows Minor Version encoding
					} else if(tag.equals(Content.Q)) { // replace Q value
						try {
							type.y.y.get(0).y=Float.parseFloat(value);
						} catch (NumberFormatException e) {
							rv=false; // need to do something to make Sonar happy. But nothing to do.
						}
						return true;
					} else {
						return value.equals(prop.y);
					}
				}
			}
		}
		return rv;
	}
1144975
public static String format(Object value, Type type) {
        value = decode(value, type);
        switch (type.getTag()) {
        case BYTE:      return formatByte((Byte) value);
        case LONG:      return formatLong((Long) value);
        case FLOAT:     return formatFloat((Float) value);
        case DOUBLE:    return formatDouble((Double) value);
        case CHAR:      return formatChar((Character) value);
        }
        if (value instanceof String)
            return formatString((String) value);
        return value + "";
    }
575645
public TypeValuePairType getTypeValuePair(String type, String value) {
        return getTypeValuePair(type, value.getBytes(StandardCharsets.UTF_8));
    }
956208
public JSType evaluate(StaticTypedScope scope, JSTypeRegistry registry) {
    JSType type = registry.createTypeFromCommentNode(root, sourceName, scope);
    root.setJSType(type);
    return type;
  }
988420
@Override
    public String tagValue(String value) {
        return StringEscapeUtils.escapeJson(delegate.tagValue(value));
    }
979853
public void addTag(TagValue tag) {
    //int pos = 0;
    //while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;
    //tags.add(pos, tag);
    tags.add(tag);
    if (!hashTagsId.containsKey(tag.getId())) {
      hashTagsId.put(tag.getId(), tag);
    }
    Tag t = TiffTags.getTag(tag.getId());
    if (t != null) {
      if (hashTagsName.containsKey(t.getName())) {
        hashTagsName.put(t.getName(), tag);
      }
    }
  }
144003
private static final TagValue createTagValue(TagKey key, String value)
      throws TagContextDeserializationException {
    try {
      return TagValue.create(value);
    } catch (IllegalArgumentException e) {
      throw new TagContextDeserializationException(
          "Invalid tag value for key " + key + ": " + value, e);
    }
  }
570444
def value=(value)
      case tag_name
      when "textarea"
        @_node.setText("")
        type(value)
      when "input"
        if file_input?
          @_node.setValueAttribute(value)
        else
          @_node.setValueAttribute("")
          type(value)
        end
      end
    end
357334
@Override
  public TypeDescription addTypeDescription(TypeDescription definition) {
    if(definition != null && definition.getTag() != null) {
      tagsDefined.add(definition.getTag());
    }
    return super.addTypeDescription(definition);
  }
1030398
function(value, type) {
        var result = value;

        if (type === 'string') {
            result = String(value);
        } else if (type === 'number') {
            result = Number(value);
        } else if (type === 'boolean') {
            result = Boolean(value);
        }

        return result;
    }
996209
private void writeTagValue(TagValue tag) throws IOException {
    int id = tag.getId();

    // Write tag value
    for (abstractTiffType tt : tag.getValue()) {
      if (id == 700) {
        // XMP
        XMP xmp = (XMP)tt;
        try {
          xmp.write(data);
        }catch (Exception ex) {
          XmlType xml = (XmlType)tt;
          try {
            xml.writeXml(data);
          } catch (Exception exx) {
            exx.printStackTrace();
            throw new IOException();
          }
        }
      } else if (id == 33723) {
        // IPTC
        abstractTiffType att = tag.getValue().get(0);
        if (att instanceof IPTC) {
          IPTC iptc = (IPTC) att;
          iptc.write(data);
          //for (int i = 0; i < iptc.getOriginal().size(); i++) data.put(iptc.getOriginal().get(i).toByte());
          //data.put((byte) 0);
        } else {
          for (int i = 0; i < tag.getValue().size(); i++) {
            data.put(tag.getValue().get(i).toByte());
          }
          data.put((byte) 0);
        }
      } else if (id == 330) {
        // SubIFD
        IFD subifd = ((IFD) tag.getValue().get(0));
        writeIFD(subifd);
      } else if (id == 34665) {
        // EXIF
        IFD exif = (IFD) tag.getValue().get(0);
        writeIFD(exif);
      } else if (id == 34675) {
        // ICC
        for (int off = tag.getReadOffset(); off < tag.getReadOffset() + tag.getReadlength(); off++) {
          data.put(input.readByte(off).toByte());
        }
        data.put((byte) 0);
      } else {
        switch (tag.getType()) {
          case 3:
            data.putShort((short) tt.toInt());
            break;
          case 8:
            data.putSShort((SShort) tt);
            break;
          case 4:
            data.putLong((Long) tt);
            break;
          case 9:
            data.putSLong((SLong) tt);
            break;
          case 11:
            data.putFloat((Float) tt);
            break;
          case 13:
            data.putInt(tt.toInt());
            break;
          case 5:
            data.putRational((Rational) tt);
            break;
          case 10:
            data.putSRational((SRational) tt);
            break;
          case 12:
            data.putDouble((Double) tt);
            break;
          case 2:
            data.put(tt.toByte());
            break;
          default:
            data.put(tt.toByte());
            break;
        }
      }
    }
  }
192300
public List<T> hasValue(String property, String value) {
		List<T> geoPackages = new ArrayList<>();
		for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap
				.values()) {
			if (properties.hasValue(property, value)) {
				geoPackages.add(properties.getGeoPackage());
			}
		}
		return geoPackages;
	}
414706
public void putTag(Tag tag, String value) {
    if (value != null) {
      mValues.put(tag, sanitizeString(value));
    }
  }
1329878
public static <E extends HTMLElement> TextContentBuilder<E> textElement(String tag, Class<E> type) {
        return new TextContentBuilder<>(createElement(tag, type));
    }
526899
public void setType(String type) throws ApplicationException {
	type = type.toLowerCase().trim();
	if (type.equals("string")) this.type = RegistryEntry.TYPE_STRING;
	else if (type.equals("dword")) this.type = RegistryEntry.TYPE_DWORD;
	else if (type.equals("key")) this.type = RegistryEntry.TYPE_KEY;
	else if (type.equals("any")) this.type = RegistryEntry.TYPE_ANY;
	else throw new ApplicationException("attribute type of the tag registry has an invalid value [" + type + "], valid values are [string, dword]");
    }
1218741
private Object getPropertyTypeValue(Class propertyType, Object value) {
        if (propertyType.equals(String.class)) {
            return value.toString();
        } else if (propertyType.equals(Boolean.class) || propertyType.equals(Boolean.TYPE)) {
            Boolean arg = null;
            if (value instanceof Boolean) {
                arg = (Boolean) value;
            } else {
                arg = Boolean.parseBoolean(value.toString());
            }
            return arg;
        } else if (propertyType.equals(Short.class) || propertyType.equals(Short.TYPE)) {
            Short arg = null;
            if (value instanceof Short) {
                arg = (Short) value;
            } else {
                arg = Short.parseShort(value.toString());
            }
            return arg;
        } else if (propertyType.equals(Integer.class) || propertyType.equals(Integer.TYPE)) {
            Integer arg = null;
            if (value instanceof Integer) {
                arg = (Integer) value;
            } else {
                arg = Integer.parseInt(value.toString());
            }
            return arg;
        } else if (propertyType.equals(Long.class) || propertyType.equals(Long.TYPE)) {
            Long arg = null;
            if (value instanceof Long) {
                arg = (Long) value;
            } else {
                arg = Long.parseLong(value.toString());
            }
            return arg;
        } else if (propertyType.equals(Float.class) || propertyType.equals(Float.TYPE)) {
            Float arg = null;
            if (value instanceof Float) {
                arg = (Float) value;
            } else {
                arg = Float.parseFloat(value.toString());
            }
            return arg;
        } else if (propertyType.equals(Double.class) || propertyType.equals(Double.TYPE)) {
            Double arg = null;
            if (value instanceof Double) {
                arg = (Double) value;
            } else {
                arg = Double.parseDouble(value.toString());
            }
            return arg;
        } else { // Object
            return value;
        }
    }
1164619
JCAnnotation annotation(int pos, Tag kind) {
        // accept(AT); // AT consumed by caller
        checkAnnotations();
        if (kind == Tag.TYPE_ANNOTATION) {
            checkTypeAnnotations();
        }
        JCTree ident = qualident(false);
        List<JCExpression> fieldValues = annotationFieldValuesOpt();
        JCAnnotation ann;
        if (kind == Tag.ANNOTATION) {
            ann = F.at(pos).Annotation(ident, fieldValues);
        } else if (kind == Tag.TYPE_ANNOTATION) {
            ann = F.at(pos).TypeAnnotation(ident, fieldValues);
        } else {
            throw new AssertionError("Unhandled annotation kind: " + kind);
        }

        storeEnd(ann, S.prevToken().endPos);
        return ann;
    }