Top Description Fields Constructors Methods
org.jboss.modules.filter

pack-priv final Class AggregatePathFilter

extends Object
implements PathFilter
Class Inheritance
All Implemented Interfaces
org.jboss.modules.filter.PathFilter
Imports
java.util.Arrays

PathFilter implementation that aggregates multiple other filters.
Authors
John E. Bailey, David M. Lloyd

Field Summary

Modifier and TypeField and Description
private final boolean
private final PathFilter[]
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
AggregatePathFilter(final boolean
true if this is an "any" filter, false if this an "all" filter
any
,
final PathFilter...
the delegate filter list
delegates
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(String
the path to check
path
)

Implements org.jboss.modules.filter.PathFilter.accept.

Determine whether a path should be accepted.
public boolean
equals(final Object
the other object
obj
)

Overrides java.lang.Object.equals.

Implements org.jboss.modules.filter.PathFilter.equals.

Determine whether this filter is equal to another.
public boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.jboss.modules.filter.PathFilter.hashCode.

Calculate a unique hash code for this path filter.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

anyback to summary
private final boolean any
delegatesback to summary
private final PathFilter[] delegates
hashCodeback to summary
private final int hashCode

Constructor Detail

AggregatePathFilterback to summary
pack-priv AggregatePathFilter(final boolean any, final PathFilter... delegates)

Construct a new instance.

Parameters
any:boolean

true if this is an "any" filter, false if this an "all" filter

delegates:PathFilter[]

the delegate filter list

Method Detail

acceptback to summary
public boolean accept(String path)

Implements org.jboss.modules.filter.PathFilter.accept.

Doc from org.jboss.modules.filter.PathFilter.accept.

Determine whether a path should be accepted. The given name is a path separated by "/" characters.

Parameters
path:String

the path to check

Returns:boolean

true if the path should be accepted, false if not

Annotations
@Override
equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Implements org.jboss.modules.filter.PathFilter.equals.

Doc from org.jboss.modules.filter.PathFilter.equals.

Determine whether this filter is equal to another. Filters must implement meaningful (non-identity) equality semantics.

Parameters
obj:Object

the other object

Returns:boolean

true if this filter is the same

equalsback to summary
public boolean equals(final AggregatePathFilter obj)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.jboss.modules.filter.PathFilter.hashCode.

Doc from org.jboss.modules.filter.PathFilter.hashCode.

Calculate a unique hash code for this path filter. Equal path filters must yield identical hash codes.

Returns:int

the hash code

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.