Interface ExposesPatternLengthAccessors<T extends RelationshipPattern>

  • Type Parameters:
    T - The type of the patterns whose lengths can be adjusted.
    All Known Subinterfaces:
    Relationship
    All Known Implementing Classes:
    RelationshipBase, RelationshipChain

    @API(status=EXPERIMENTAL,
         since="2021.2.3")
    public interface ExposesPatternLengthAccessors<T extends RelationshipPattern>
    This interface is used to derive new relationship patterns from existing relationships or chains of relationships with new lengths (min, max or unbounded) configured.
    Since:
    2021.2.3
    Author:
    Michael J. Simons
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T length​(java.lang.Integer minimum, java.lang.Integer maximum)
      Creates a new relationship pattern with a new length
      T max​(java.lang.Integer maximum)
      Creates a new relationship pattern with a new maximum length
      T min​(java.lang.Integer minimum)
      Creates a new relationship pattern with a new minimum length
      T unbounded()
      Creates a new relationship pattern with an unbound length minimum length
    • Method Detail

      • unbounded

        @NotNull
        @Contract(pure=true)
        T unbounded()
        Creates a new relationship pattern with an unbound length minimum length
        Returns:
        the new relationship
        Since:
        1.1.1
      • min

        @NotNull
        @Contract(pure=true)
        T min​(java.lang.Integer minimum)
        Creates a new relationship pattern with a new minimum length
        Parameters:
        minimum - the new minimum
        Returns:
        the new relationship
      • max

        @NotNull
        @Contract(pure=true)
        T max​(java.lang.Integer maximum)
        Creates a new relationship pattern with a new maximum length
        Parameters:
        maximum - the new maximum
        Returns:
        the new relationship
      • length

        @NotNull
        @Contract(pure=true)
        T length​(java.lang.Integer minimum,
                 java.lang.Integer maximum)
        Creates a new relationship pattern with a new length
        Parameters:
        minimum - the new minimum
        maximum - the new maximum
        Returns:
        the new relationship