Codota Logo
Filter.apply
Code IndexAdd Codota to your IDE (free)

How to use
apply
method
in
org.dihedron.core.filters.Filter

Best Java code snippets using org.dihedron.core.filters.Filter.apply (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.dihedron.commons/dihedron-core

/**
 * Applies the given filter to the input and returns only those elements 
 * that match it.
 * 
 * @param filter
 *   a (possible compound) filter; elements in the input array matching the 
 *   filter will be returned.
 * @param elements
 *   the collection of objects to filter.
 * @return
 *   a filtered set of elements.
 */
public static <T> Collection<T> apply(Filter<T> filter, T ... elements) {
  List<T> list = new ArrayList<T>();
  if(elements != null) {
    for(T element : elements) {
      list.add(element);
    }
  }
  return apply(filter, list);
}    

origin: org.dihedron.commons/base

/**
 * Applies the given filter to the input and returns only those elements 
 * that match it.
 * 
 * @param filter
 *   a (possible compound) filter; elements in the input array matching the 
 *   filter will be returned.
 * @param elements
 *   the collection of objects to filter.
 * @return
 *   a filtered set of elements.
 */
public static <T> Collection<T> apply(Filter<T> filter, T ... elements) {
  List<T> list = new ArrayList<T>();
  if(elements != null) {
    for(T element : elements) {
      list.add(element);
    }
  }
  return apply(filter, list);
}    

origin: org.dihedron.commons/base

/**
 * Returns the filtered set of methods of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of methods from the given class and its super-classes.
 */
public static Set<Method> getMethods(Class<?> clazz, Filter<Method>filter) {
  Set<Method> methods = new HashSet<Method>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all methods and apply filters
    methods.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return methods;
}    
origin: org.dihedron.commons/dihedron-core

/**
 * Returns the filtered set of fields of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose fields are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields from the given class and its super-classes.
 */
public static Set<Field> getFields(Class<?> clazz, Filter<Field> filter) {
  Set<Field> fields = new HashSet<Field>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters
    fields.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return fields;
}
origin: org.dihedron.commons/base

/**
 * Returns the filtered set of fields and/or methods of the given class, 
 * including those inherited from the super-classes; if provided, complex 
 * filter criteria can be applied.
 * 
 * @param clazz
 *   the class whose fields and methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields and/or methods from the given class and its 
 *   super-classes.
 */
public static Set<Member> getMembers(Class<?> clazz, Filter<Member> filter) {
  Set<Member> members = new HashSet<Member>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters			
    members.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // get all methods and apply filters
    members.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return members;
}
  
origin: org.dihedron.commons/dihedron-commons

/**
 * Applies the given filter to the input and returns only those elements 
 * that match it.
 * 
 * @param filter
 *   a (possible compound) filter; elements in the input array matching the 
 *   filter will be returned.
 * @param elements
 *   the collection of objects to filter.
 * @return
 *   a filtered set of elements.
 */
@SafeVarargs
public static <T> Collection<T> apply(Filter<T> filter, T ... elements) {
  List<T> list = new ArrayList<T>();
  if(elements != null) {
    for(T element : elements) {
      list.add(element);
    }
  }
  return apply(filter, list);
}    

origin: org.dihedron.commons/dihedron-commons

/**
 * Returns the filtered set of fields of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose fields are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields from the given class and its super-classes.
 */
public static Set<Field> getFields(Class<?> clazz, Filter<Field> filter) {
  Set<Field> fields = new HashSet<Field>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters
    fields.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return fields;
}
origin: org.dihedron.commons/dihedron-core

/**
 * Returns the filtered set of methods of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of methods from the given class and its super-classes.
 */
public static Set<Method> getMethods(Class<?> clazz, Filter<Method>filter) {
  Set<Method> methods = new HashSet<Method>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all methods and apply filters
    methods.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return methods;
}    
origin: org.dihedron.commons/base

/**
 * Returns the filtered set of fields of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose fields are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields from the given class and its super-classes.
 */
public static Set<Field> getFields(Class<?> clazz, Filter<Field> filter) {
  Set<Field> fields = new HashSet<Field>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters
    fields.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return fields;
}
origin: org.dihedron.commons/dihedron-commons

/**
 * Returns the filtered set of methods of the given class, including those 
 * inherited from the super-classes; if provided, complex filter criteria 
 * can be applied.
 * 
 * @param clazz
 *   the class whose methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of methods from the given class and its super-classes.
 */
public static Set<Method> getMethods(Class<?> clazz, Filter<Method>filter) {
  Set<Method> methods = new HashSet<Method>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all methods and apply filters
    methods.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return methods;
}    
origin: org.dihedron.commons/dihedron-core

/**
 * Returns the filtered set of fields and/or methods of the given class, 
 * including those inherited from the super-classes; if provided, complex 
 * filter criteria can be applied.
 * 
 * @param clazz
 *   the class whose fields and methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields and/or methods from the given class and its 
 *   super-classes.
 */
public static Set<Member> getMembers(Class<?> clazz, Filter<Member> filter) {
  Set<Member> members = new HashSet<Member>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters			
    members.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // get all methods and apply filters
    members.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return members;
}
  
origin: org.dihedron.commons/dihedron-commons

/**
 * Returns the filtered set of fields and/or methods of the given class, 
 * including those inherited from the super-classes; if provided, complex 
 * filter criteria can be applied.
 * 
 * @param clazz
 *   the class whose fields and methods are being retrieved.
 * @param filter
 *   an optional filter; to get all fields pass in a {@code null} value.
 * @return
 *   the set of fields and/or methods from the given class and its 
 *   super-classes.
 */
public static Set<Member> getMembers(Class<?> clazz, Filter<Member> filter) {
  Set<Member> members = new HashSet<Member>();
  
  Class<?> cursor = clazz;
  while(cursor != null && cursor != Object.class) {
    // get all fields and apply filters			
    members.addAll(Filter.apply(filter, cursor.getDeclaredFields()));
    // get all methods and apply filters
    members.addAll(Filter.apply(filter, cursor.getDeclaredMethods()));
    // up one step on the hierarchy
    cursor = cursor.getSuperclass();
  }        
  return members;
}
  
org.dihedron.core.filtersFilterapply

Javadoc

Applies the given filter to the input and returns only those elements that match it.

Popular methods of Filter

  • matches
    Returns whether the given object matches this filter.
  • reset
    This is an optional method; it should be implemented by stateful filters, which need to be reset bef

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
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