Tabnine Logo
Filter
Code IndexAdd Tabnine to your IDE (free)

How to use
Filter
in
org.jdom2.filter

Best Java code snippets using org.jdom2.filter.Filter (Showing top 14 results out of 315)

origin: org.jdom/jdom

@Override
public T filter(Object content) {
  Object o = base.filter(content);
  if (o != null) {
    return refiner.filter(content);
  }
  return null;
}

origin: org.jdom/jdom

@Override
public Object filter(Object content) {
  if (filter.matches(content)) {
    return null;
  }
  return content;
}
origin: org.mycore/mycore-mods

@SuppressWarnings("unchecked")
Filter<Content> sharedMetadata = (Filter<Content>) Filters.element("part",
  MCRConstants.MODS_NAMESPACE).negate();
relatedItem.removeContent(sharedMetadata);
relatedItem.addContent(holderWrapper.getMODS().cloneContent());
origin: org.jdom/jdom

final F gotit = filter.filter(elementData[bpi]);
if (gotit != null) {
  backingpos[backingsize] = bpi;
origin: org.jdom/jdom

@Override
public Content filter(Object obj) {
  if (left.matches(obj) || right.matches(obj)) {
    return (Content)obj;
  }
  return null;
}
origin: org.jdom/jdom

/**
 * 
 */
@Override
public T evaluateFirst(Object context) {
  Object raw = evaluateRawFirst(context);
  if (raw == null) {
    return null;
  }
  return xfilter.filter(raw);
}
origin: org.jdom/jdom

  throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
if (filter.matches(obj)) {
  ContentList.this.add(adj, obj);
origin: org.jdom/jdom

@Override
public List<T> evaluate(Object context) {
  return xfilter.filter(evaluateRawAll(context));
}
origin: org.jdom/jdom

      "Cannot add null content");
if (filter.matches(c)) {
  ContentList.this.add(adj + count, c);
origin: org.jdom/jdom

T t = filter.filter(o);
if (t == null) {
  filtered.add(o);
origin: org.jdom/jdom

@Override
public boolean hasNext() {
  
  canremove = false;
  
  if (nextObject != null) {
    return true;
  }
  while (iterator.hasNext()) {
    final Object obj = iterator.next();
    final T f = filter.filter(obj);
    if (f != null) {
      nextObject = f;
      return true;
    }
  }
  return false;
}
origin: org.jdom/jdom

/**
 * Set the object at the specified location to the supplied object.
 * 
 * @param index
 *        The location to set the value to.
 * @param obj
 *        The location to set the value to.
 * @return The object which was replaced. throws
 *         IndexOutOfBoundsException if index < 0 || index >= size()
 */
@Override
public F set(final int index, final F obj) {
  if (index < 0) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  final int adj = resync(index);
  if (adj == size) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  final F ins = filter.filter(obj);
  if (ins != null) {
    final F oldc = filter.filter(ContentList.this.set(adj, ins));
    // optimize the backing....
    xdata = getDataModCount();
    return oldc;
  }
  throw new IllegalAddException("Filter won't allow index " +
      index + " to be set to " +
      (obj.getClass()).getName());
}
origin: org.jdom/jdom

/**
 * Return the object at the specified offset.
 * 
 * @param index
 *        The offset of the object.
 * @return The Object which was returned.
 */
@Override
public F get(final int index) {
  if (index < 0) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  final int adj = resync(index);
  if (adj == size) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  return filter.filter(ContentList.this.get(adj));
}
origin: org.jdom/jdom

/**
 * Remove the object at the specified offset.
 * 
 * @param index
 *        The offset of the object.
 * @return The Object which was removed.
 */
@Override
public F remove(final int index) {
  if (index < 0) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  final int adj = resync(index);
  if (adj == size) {
    throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size());
  }
  final Content oldc = ContentList.this.remove(adj);
  // optimise the backing cache.
  backingsize = index;
  xdata = getDataModCount();
  // use Filter to ensure the cast is right.
  return filter.filter(oldc);
}
org.jdom2.filterFilter

Javadoc

A generalized filter to restrict visibility or mutability on a list.

Most used methods

  • filter
    Filter the input list keeping only the items that match the Filter.
  • matches
    Check to see if the object matches a predefined set of rules.
  • negate
    Creates an 'inverse' filter

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now