public class WithNameSpecification extends Specification
Represents a specification that filters properties with a particular name.
Constructor and Description |
---|
WithNameSpecification(String propertyName)
Initializes a new instance of the
WithNameSpecification class. |
WithNameSpecification(String propertyName,
boolean ignoreCase)
Initializes a new instance of the
WithNameSpecification class. |
Modifier and Type | Method and Description |
---|---|
boolean |
getIgnoreCase()
Gets a value indicating whether the case of the strings being compared should be ignored.
|
String |
getPropertyName()
Gets the name of properties that satisfy the specification.
|
boolean |
isSatisfiedBy(MetadataProperty candidate)
Verifies whether a
MetadataProperty satisfies the specification. |
and, not, or
public WithNameSpecification(String propertyName)
Initializes a new instance of the WithNameSpecification
class.
propertyName
- The type of properties that satisfy the specification.public WithNameSpecification(String propertyName, boolean ignoreCase)
Initializes a new instance of the WithNameSpecification
class.
propertyName
- The type of properties that satisfy the specification.ignoreCase
- A value indicating whether the case of the strings being compared should be ignored.public final String getPropertyName()
Gets the name of properties that satisfy the specification.
public final boolean getIgnoreCase()
Gets a value indicating whether the case of the strings being compared should be ignored.
public boolean isSatisfiedBy(MetadataProperty candidate)
Verifies whether a MetadataProperty
satisfies the specification.
isSatisfiedBy
in class Specification
candidate
- A metadata property to test.