Class PermuteProperty<T>

Object
AnchorBean<PermuteProperty<T>>
PermuteProperty<T>
Type Parameters:
T - element-type of the bean whose property or properties will be changed during permutation.
Direct Known Subclasses:
PermutePropertyDoubleSet, PermutePropertySequence, PermutePropertyStringSet

public abstract class PermuteProperty<T> extends AnchorBean<PermuteProperty<T>>
Changes properties of an AnchorBean to one of a range of possible values.

A property can be a direct property of the bean, or one or more indirect properties found in nested child-beans.

  • Constructor Details

    • PermuteProperty

      public PermuteProperty()
  • Method Details

    • describePropertyValue

      public abstract String describePropertyValue(T value)
      Describes a particular property-value in a unique but human-readable way.
      Parameters:
      value - the value to describe, which should one of the values returned by propertyValues().
      Returns:
      the description of value.
    • createSetter

      public PermutationAssigner createSetter(AnchorBean<?> bean) throws AssignPermutationException
      Creates a PermutationAssigner which allows the particular property to be changed.
      Parameters:
      bean - the bean whose property will be changed.
      Returns:
      the setter that can change the property.
      Throws:
      AssignPermutationException - if no property can be found at propertyPath to change.
    • propertyValues

      public abstract Iterator<T> propertyValues()
      An iterator with possible alternative values for the property.
      Returns:
      a newly created iterator of all possible alternative values.
    • getPropertyPath

      public String getPropertyPath()
      Either a direct property of a bean or a nested-property with the children separated by full-stops.

      e.g. a direct property someproperty or a nested-property e.g. somechild1.somechild2.someproperty

      A child bean used in this way must be of single multiplicity, and always be a subclass of AnchorBean.

    • setPropertyPath

      public void setPropertyPath(String propertyPath)
      Either a direct property of a bean or a nested-property with the children separated by full-stops.

      e.g. a direct property someproperty or a nested-property e.g. somechild1.somechild2.someproperty

      A child bean used in this way must be of single multiplicity, and always be a subclass of AnchorBean.

    • getAdditionalPropertyPaths

      public StringSet getAdditionalPropertyPaths()
      Additional property paths that are also changed, together with propertyPath.
    • setAdditionalPropertyPaths

      public void setAdditionalPropertyPaths(StringSet additionalPropertyPaths)
      Additional property paths that are also changed, together with propertyPath.