org.apache.felix.framework.capabilityset

## Class SimpleFilter

- java.lang.Object
- - org.apache.felix.framework.capabilityset.SimpleFilter

    public class SimpleFilter
    extends Object

### Field Summary

Fields
`static int` `AND`
`static int` `APPROX`
`static int` `EQ`
`static int` `GTE`
`static int` `LTE`
`static int` `MATCH_ALL`
`static int` `NOT`
`static int` `OR`
`static int` `PRESENT`
`static int` `SUBSTRING`

### Constructor Summary

Constructors
Constructor and Description
`SimpleFilter(String attr, Object value, int op)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static boolean` `compareSubstring(List<String> pieces, String s)`
`static SimpleFilter` `convert(Map<String,Object> attrs)` Converts a attribute map to a filter.
`boolean` `equals(Object o)`
`String` `getName()`
`int` `getOperation()`
`Object` `getValue()`
`int` `hashCode()`
`static SimpleFilter` `parse(String filter)`
`static List<String>` `parseSubstring(String value)`
`String` `toString()`
`static String` `unparseSubstring(List<String> pieces)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### MATCH_ALL

    public static final int MATCH_ALL

See Also:
  Constant Field Values

#### AND

    public static final int AND

See Also:
  Constant Field Values

#### OR

    public static final int OR

See Also:
  Constant Field Values

#### NOT

    public static final int NOT

See Also:
  Constant Field Values

#### EQ

    public static final int EQ

See Also:
  Constant Field Values

#### LTE

    public static final int LTE

See Also:
  Constant Field Values

#### GTE

    public static final int GTE

See Also:
  Constant Field Values

#### SUBSTRING

    public static final int SUBSTRING

See Also:
  Constant Field Values

#### PRESENT

    public static final int PRESENT

See Also:
  Constant Field Values

#### APPROX

    public static final int APPROX

See Also:
  Constant Field Values

### Constructor Detail

#### SimpleFilter

    public SimpleFilter(String attr,
                        Object value,
                        int op)

### Method Detail

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### getName

    public String getName()

#### getValue

    public Object getValue()

#### getOperation

    public int getOperation()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### parse

    public static SimpleFilter parse(String filter)

#### parseSubstring

    public static List<String> parseSubstring(String value)

#### unparseSubstring

    public static String unparseSubstring(List<String> pieces)

#### compareSubstring

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

#### 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.