Module org.dyn4j

Class PairwiseTypedFallbackCondition

    • Constructor Detail

      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              java.lang.Class<? extends Convex> type2)
        Minimal constructor.

        The ordering of the types doesn't matter.

        The type matching defaults to strict for both types.

        Parameters:
        type1 - the first type of the pair
        type2 - the second type of the pair
      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              java.lang.Class<? extends Convex> type2,
                                              int sortIndex)
        Optional constructor.

        The ordering of the types doesn't matter.

        The type matching defaults to strict for both types.

        Parameters:
        type1 - the first type of the pair
        type2 - the second type of the pair
        sortIndex - the sort index of this condition
      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              java.lang.Class<? extends Convex> type2,
                                              boolean strict)
        Optional constructor.

        The ordering of the types doesn't matter.

        Parameters:
        type1 - the first type of the pair
        type2 - the second type of the pair
        strict - true if a strict type comparison should be performed for both types
      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              java.lang.Class<? extends Convex> type2,
                                              boolean strict,
                                              int sortIndex)
        Optional constructor.

        The ordering of the types doesn't matter.

        Parameters:
        type1 - the first type of the pair
        type2 - the second type of the pair
        strict - true if a strict type comparison should be performed on both types
        sortIndex - the sort index of this condition
      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              boolean strict1,
                                              java.lang.Class<? extends Convex> type2,
                                              boolean strict2)
        Optional constructor.

        The ordering of the types doesn't matter.

        Parameters:
        type1 - the first type of the pair
        strict1 - true if a strict type comparison should be performed on the first type
        type2 - the second type of the pair
        strict2 - true if a strict type comparison should be performed on the second type
      • PairwiseTypedFallbackCondition

        public PairwiseTypedFallbackCondition​(java.lang.Class<? extends Convex> type1,
                                              boolean strict1,
                                              java.lang.Class<? extends Convex> type2,
                                              boolean strict2,
                                              int sortIndex)
        Full constructor.

        The ordering of the types doesn't matter.

        Parameters:
        type1 - the first type of the pair
        strict1 - true if a strict type comparison should be performed on the first type
        type2 - the second type of the pair
        strict2 - true if a strict type comparison should be performed on the second type
        sortIndex - the sort index of this condition
    • 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
      • getType1

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

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

        public boolean isStrict1()
        Returns true if this condition uses a strict type comparison for the first type.
        Returns:
        boolean
      • isStrict2

        public boolean isStrict2()
        Returns true if this condition uses a strict type comparison for the second type.
        Returns:
        boolean