@OpenApiAll public class TypeFilterImpl extends java.lang.Object implements TypeFilter
TypeFilter implementation.| Constructor and Description |
|---|
TypeFilterImpl()
Constructor.
|
TypeFilterImpl(java.util.Collection<?> types)
Constructor.
|
TypeFilterImpl(java.util.Collection all,
java.util.Collection restricted)
An utility constructor for compatibility with old approach when all and restricted types were used.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(BaseElement obj) |
boolean |
accept(BaseElement baseElement,
boolean checkType)
Tests element to satisfy filter condition.
|
protected boolean |
acceptByType(java.util.Collection<?> types,
BaseElement baseElement)
Test for acceptable element type.
|
java.util.Collection<?> |
getTypes()
Get the acceptable element types.
|
public TypeFilterImpl()
public TypeFilterImpl(@CheckForNull
java.util.Collection<?> types)
types - acceptable types. Can be null.public TypeFilterImpl(@CheckForNull
java.util.Collection all,
@CheckForNull
java.util.Collection restricted)
all - all typesrestricted - restricted types.public java.util.Collection<?> getTypes()
TypeFiltergetTypes in interface TypeFilterpublic final boolean accept(BaseElement obj)
accept in interface com.nomagic.magicdraw.ui.ElementFilterpublic boolean accept(BaseElement baseElement, boolean checkType)
TypeFilteraccept in interface TypeFilterbaseElement - element.checkType - check object typeprotected boolean acceptByType(@CheckForNull
java.util.Collection<?> types,
@Nonnull
BaseElement baseElement)
types - acceptable types. Null means ANY typebaseElement - element to be tested. Can not be null.