Gets the tag size.

@param tag the tag
@return the tag size
2487
private int getTagSize(TagValue tag) {
    int n = tag.getCardinality();
    int id = tag.getId();

    // Calculate tag size
    int type = tag.getType();

    if (id == 330) {
      // SubIFD
      n = 1000;
    }
    if (id == 700) {
      // XMP
      if (tag.getValue().size() > 0)
        n = tag.getValue().get(0).toString().length();
    }
    if (id == 33723) {
      // IPTC
      n = tag.getReadlength();
    }
    if (id == 34665) {
      // EXIF
      n = 1000;
    }
    if (id == 34675) {
      // ICC
      n = tag.getReadlength();
    }

    int typeSize = TiffTags.getTypeSize(type);
    int tagSize = typeSize * n;
    return tagSize;
  }
93414
public static int w(String tag, String msg) {
        collectLogEntry(Constants.WARN, tag, msg, null);
        if (isLoggable(tag, Constants.WARN)) {
            return android.util.Log.w(tag, msg);
        }
        return 0;
    }
1017393
public static int d(String tag, String msg) {
        collectLogEntry(Constants.DEBUG, tag, msg, null);
        if (isLoggable(tag, Constants.DEBUG)) {
            return android.util.Log.d(tag, msg);
        }
        return 0;
    }
534939
public int size() {
        int size = 0;
        try {
            if (getParent() != null) {
                size = getParent().locateChildElements(getLocator()).size();
            } else {
                size = HtmlElementUtils.locateElements(getLocator()).size();
            }
        } catch (NoSuchElementException e) { // NOSONAR
            // do nothing, let size be returned as 0
        }

        return size;
    }
1273512
public Builder tag(String tag) {
        ends.push("</" + tag + ">");
        html.a('<').a(tag).a('>');
        return this;
    }
145335
public static int v(String tag, String msg) {
        collectLogEntry(Constants.VERBOSE, tag, msg, null);
        if (isLoggable(tag, Constants.VERBOSE)) {
            return android.util.Log.v(tag, msg);
        }
        return 0;
    }
1307830
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setTag(final String tag) {
        pathBuilder.setTag(tag);
        return (T) this;
    }
67700
@Override
  public int size() {
    int size = 0;
    for (E e = first; e != null; e = getNext(e)) {
      size++;
    }
    return size;
  }
458068
public java.lang.String getInstanceTag() {
    java.lang.Object ref = instanceTag_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      instanceTag_ = s;
      return s;
    }
  }
569440
public static void setTag(String tag) {
        d("Changing log tag to %s", tag);
        TAG = tag;

        // Reinitialize the DEBUG "constant"
        DEBUG = Log.isLoggable(TAG, Log.VERBOSE);
    }
504443
public long getImageSize() {
    long x = 0, y = 0;
    if (tags.containsTagId(TiffTags.getTagId("ImageLength")))
      x = tags.get("ImageLength").getFirstNumericValue();
    if (tags.containsTagId(TiffTags.getTagId("ImageWidth")))
      y = tags.get("ImageWidth").getFirstNumericValue();
    return x * y;
  }
356502
public <T extends Tag> T get(String tagName) {
        return (T) this.value.get(tagName);
    }
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
1056103
public function getTag($tag)
    {
        return isset($this->tags[$tag]) ? $this->tags[$tag] : null;
    }
1032059
@VisibleForTesting
  public static TagValue[] createTagValues(int size, String name) {
    TagValue[] values = new TagValue[size];
    for (int i = 0; i < size; i++) {
      values[i] = TagValue.create(name + i);
    }
    return values;
  }
571883
@Override
    public int size() {
        Node h = putStack.get();
        int putStackSize = h == null ? 0 : h.size;
        return putStackSize + takeStackSize.get();
    }
209309
@Override
    public int compareTo(Tag tag) {
        int keyResult = this.key.compareTo(tag.key);

        if (keyResult != 0) {
            return keyResult;
        }

        return this.value.compareTo(tag.value);
    }