public abstract class Filter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
EVENT_FILTER |
protected static int |
INSTANCE_FILTER |
Constructor and Description |
---|
Filter()
Default constructor, setting default values of 0 for id, NONE for scope,
and an empty attribute list.
|
Filter(int id,
ObjectQ.Scope scope,
java.util.List<Attribute> attrs)
Constructor providing all filter values.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Attribute> |
getAttrs()
Get the filter attributes.
|
int |
getId()
Get the filter id.
|
ObjectQ.Scope |
getScope()
Get the filter scope.
|
protected void |
restore(int type,
byte[] bytes,
boolean idsOnly)
Restore the filter from a previously flattened byte array.
|
protected byte[] |
save(int type)
Save the filter in "flattened" form.
|
java.lang.String |
toString() |
protected static final int EVENT_FILTER
protected static final int INSTANCE_FILTER
public Filter()
public Filter(int id, ObjectQ.Scope scope, java.util.List<Attribute> attrs) throws java.lang.IllegalArgumentException
id
- The filter id.scope
- The filter scope.attrs
- The filter attribute list.java.lang.IllegalArgumentException
public java.util.List<Attribute> getAttrs()
public int getId()
public ObjectQ.Scope getScope()
protected void restore(int type, byte[] bytes, boolean idsOnly) throws BadMagicException
bytes
- The byte array.idsOnly
- If true, the buffer contains attribute ids only; otherwise
it contains attributes with their associated values.BadMagicException
- The "magic number" was invalid.protected byte[] save(int type)
public java.lang.String toString()
toString
in class java.lang.Object