Codota Logo
Element
Code IndexAdd Codota to your IDE (free)

How to use
Element
in
org.archive.util.anvl

Best Java code snippets using org.archive.util.anvl.Element (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: iipc/webarchive-commons

public Map<String, String> asMap() {
  Map<String, String> m = new HashMap<String, String>(size());
  for (final Iterator<Element> i = iterator(); i.hasNext();) {
    Element e = i.next();
    m.put(e.getLabel().toString(),
      e.isValue()? e.getValue().toString(): (String)null);
  }
  return m;
}

origin: iipc/openwayback

ANVLRecord headers = recinfo.getExtraHeaders();
for (Element el : headers) {
  w.write(el.getLabel() + ": " + el.getValue() + CRLF);
origin: stackoverflow.com

 private class CollectPathsVisitor extends ElementVisitor {
  public final Set<String> paths = new TreeSet<String>();
  public Object visit(Element element) {
    final IPath parentPath = (IPath) peek();
    final IPath path = parentPath.append(element.getLabel());
    if (!hasChildren(element))
      paths.add(path);
    return path;
  }
}
origin: org.netpreserve.commons/webarchive-commons

public boolean addLabel(final String l) {
  return super.add(new Element(new Label(l)));
}
origin: org.netpreserve.commons/webarchive-commons

public Value getValue() {
  if (!isValue()) {
    return null;
  }
  return (Value)this.subElements[1];
}

origin: org.netpreserve.commons/commons-web

public boolean addLabel(final String l) {
  return super.add(new Element(new Label(l)));
}
origin: org.netpreserve.commons/commons-web

public Value getValue() {
  if (!isValue()) {
    return null;
  }
  return (Value)this.subElements[1];
}

origin: org.netpreserve.commons/webarchive-commons

public Map<String, String> asMap() {
  Map<String, String> m = new HashMap<String, String>(size());
  for (final Iterator<Element> i = iterator(); i.hasNext();) {
    Element e = i.next();
    m.put(e.getLabel().toString(),
      e.isValue()? e.getValue().toString(): (String)null);
  }
  return m;
}

origin: iipc/webarchive-commons

public boolean addLabel(final String l) {
  return super.add(new Element(new Label(l)));
}
origin: iipc/webarchive-commons

public Value getValue() {
  if (!isValue()) {
    return null;
  }
  return (Value)this.subElements[1];
}

origin: org.netpreserve.commons/commons-web

public Map<String, String> asMap() {
  Map<String, String> m = new HashMap<String, String>(size());
  for (final Iterator<Element> i = iterator(); i.hasNext();) {
    Element e = i.next();
    m.put(e.getLabel().toString(),
      e.isValue()? e.getValue().toString(): (String)null);
  }
  return m;
}

origin: org.netpreserve.commons/webarchive-commons

public boolean addLabelValue(final String l, final String v) {
  try {
    return super.add(new Element(new Label(l), new Value(v)));
  } catch (IllegalArgumentException e) {
    logger.log(Level.WARNING, "bad label " + l + " or value " + v, e);
    return false;
  }
}

origin: org.netpreserve.commons/webarchive-commons

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < subElements.length; i++) {
      sb.append(subElements[i].toString());
      if (i == 0) {
        // Add colon after Label.
        sb.append(':');
        if (isValue()) {
          // Add space to intro the value.
          sb.append(' ');
        }
      }
    }
    return sb.toString();
  }
}
origin: org.netpreserve.commons/commons-web

public boolean addLabelValue(final String l, final String v) {
  try {
    return super.add(new Element(new Label(l), new Value(v)));
  } catch (IllegalArgumentException e) {
    logger.log(Level.WARNING, "bad label " + l + " or value " + v, e);
    return false;
  }
}

origin: org.netpreserve.commons/commons-web

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < subElements.length; i++) {
      sb.append(subElements[i].toString());
      if (i == 0) {
        // Add colon after Label.
        sb.append(':');
        if (isValue()) {
          // Add space to intro the value.
          sb.append(' ');
        }
      }
    }
    return sb.toString();
  }
}
origin: iipc/webarchive-commons

public boolean addLabelValue(final String l, final String v) {
  try {
    return super.add(new Element(new Label(l), new Value(v)));
  } catch (IllegalArgumentException e) {
    logger.log(Level.WARNING, "bad label " + l + " or value " + v, e);
    return false;
  }
}

origin: iipc/webarchive-commons

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < subElements.length; i++) {
      sb.append(subElements[i].toString());
      if (i == 0) {
        // Add colon after Label.
        sb.append(':');
        if (isValue()) {
          // Add space to intro the value.
          sb.append(' ');
        }
      }
    }
    return sb.toString();
  }
}
org.archive.util.anvlElement

Javadoc

ANVL 'data element'. Made of a lone Label, or a Label plus Value.

Most used methods

  • getLabel
  • getValue
  • <init>
  • isValue

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now