Class SimpleFilter

java.lang.Object
org.apache.felix.utils.resource.SimpleFilter

public class SimpleFilter extends Object
  • Field Details

  • Constructor Details

    • SimpleFilter

      SimpleFilter(String name, Object value, int op)
  • Method Details

    • getName

      public String getName()
    • getValue

      public Object getValue()
    • getOperation

      public int getOperation()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      private void toString(StringBuilder sb)
    • reuseCommonString

      private static String reuseCommonString(String str)
    • toString

      private static void toString(StringBuilder sb, List<?> list)
    • toDecodedString

      private static String toDecodedString(String s, int startIdx, int endIdx)
    • toEncodedString

      private static void toEncodedString(StringBuilder sb, Object o)
    • parse

      public static SimpleFilter parse(String filter)
    • subfilter

      private static SimpleFilter subfilter(String filter, int startIdx, int endIdx)
    • parseSubstring

      public static List<String> parseSubstring(String value)
    • unparseSubstring

      public static void unparseSubstring(StringBuilder sb, List<?> pieces)
    • compareSubstring

      public static boolean compareSubstring(List<String> pieces, String s)
    • skipWhitespace

      private static int skipWhitespace(String s, int startIdx)
    • convert

      public static SimpleFilter convert(Map<String,Object> attrs)
      Converts a attribute map to a filter. The filter is created by iterating over the map's entry set. If ordering of attributes is important (e.g., for hitting attribute indices), then the map's entry set should iterate in the desired order. Equality testing is assumed for all attribute types other than version ranges, which are handled appropriated. If the attribute map is empty, then a filter that matches anything is returned.
      Parameters:
      attrs - Map of attributes to convert to a filter.
      Returns:
      A filter corresponding to the attributes.