org.apache.commons.betwixt.strategy.impl
Class OverrideCollectiveTypeStategy
java.lang.Object
org.apache.commons.betwixt.strategy.CollectiveTypeStrategy
org.apache.commons.betwixt.strategy.impl.OverrideCollectiveTypeStategy
public class OverrideCollectiveTypeStategy
- extends CollectiveTypeStrategy
Strategy that allows specific classes to be marked as
collective (overrideCollective(Class)
)
or not collective (overrideNotCollective(Class)
).
- Since:
- 0.8
Method Summary |
boolean |
isCollective(java.lang.Class type)
Is this a loop type class? |
void |
overrideCollective(java.lang.Class type)
Marks the given type to be treated as collective. |
void |
overrideNotCollective(java.lang.Class type)
Marks the given type to be treated as not collective |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
private final CollectiveTypeStrategy delegate
collectiveClasses
private final java.util.Collection collectiveClasses
notCollectiveClasses
private final java.util.Collection notCollectiveClasses
OverrideCollectiveTypeStategy
public OverrideCollectiveTypeStategy()
- Constructs a strategy which delegates to CollectiveTypeStrategy#DEFAULT
OverrideCollectiveTypeStategy
public OverrideCollectiveTypeStategy(CollectiveTypeStrategy delegate)
- Constructs a strategy which delegates all those that it does not override.
- Parameters:
delegate
-
overrideCollective
public void overrideCollective(java.lang.Class type)
- Marks the given type to be treated as collective.
- Parameters:
type
- Class
, not null
overrideNotCollective
public void overrideNotCollective(java.lang.Class type)
- Marks the given type to be treated as not collective
- Parameters:
type
-
isCollective
public boolean isCollective(java.lang.Class type)
- Description copied from class:
CollectiveTypeStrategy
- Is this a loop type class?
- Specified by:
isCollective
in class CollectiveTypeStrategy
- Parameters:
type
- is this Class
a loop type?
- Returns:
- true if the type is a loop type, or if type is null
- See Also:
CollectiveTypeStrategy.isCollective(Class)