Module org.dyn4j

Class SingleTypedFallbackCondition

    • Constructor Detail

      • SingleTypedFallbackCondition

        public SingleTypedFallbackCondition​(java.lang.Class<? extends Convex> type)
        Minimal constructor.
        Parameters:
        type - the type
      • SingleTypedFallbackCondition

        public SingleTypedFallbackCondition​(java.lang.Class<? extends Convex> type,
                                            int sortIndex)
        Optional constructor.
        Parameters:
        type - the type
        sortIndex - the sort index of this condition
      • SingleTypedFallbackCondition

        public SingleTypedFallbackCondition​(java.lang.Class<? extends Convex> type,
                                            boolean strict)
        Optional constructor.
        Parameters:
        type - the type
        strict - true if a strict type comparison should be performed
      • SingleTypedFallbackCondition

        public SingleTypedFallbackCondition​(java.lang.Class<? extends Convex> type,
                                            int sortIndex,
                                            boolean strict)
        Full constructor.
        Parameters:
        type - the type
        sortIndex - the sort index of this condition
        strict - true if a strict type comparison should be performed
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isMatch

        public boolean isMatch​(java.lang.Class<? extends Convex> type1,
                               java.lang.Class<? extends Convex> type2)
        Description copied from class: TypedFallbackCondition
        Returns true if the given types match this condition.
        Specified by:
        isMatch in class TypedFallbackCondition
        Parameters:
        type1 - the type of the first Convex
        type2 - the type of the second Convex
        Returns:
        boolean
      • getType

        public java.lang.Class<? extends Convex> getType()
        Returns the type for this fallback condition.
        Returns:
        Class<? extends Convex>
      • isStrict

        public boolean isStrict()
        Returns true if this condition uses a strict type comparison.
        Returns:
        boolean