Package org.apache.tools.ant.types

# Class PatternSet.NameEntry

java.lang.Object
org.apache.tools.ant.types.PatternSet.NameEntry

Direct Known Subclasses:
  `PatternSet.PatternFileNameEntry`

Enclosing class:
  `PatternSet`

public class PatternSet.NameEntry extends Object
inner class to hold a name on list. "If" and "Unless" attributes may be used to invalidate the entry based on the existence of a property (typically set through the use of the Available task) or value of an expression.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NameEntry()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `evalName(Project p)`
  This validates the name - checks the if and unless properties.
  `String`
  `getName()`
  `void`
  `setIf(Object cond)`
  Sets the if attribute.
  `void`
  `setIf(String cond)`
  Sets the if attribute.
  `void`
  `setName(String name)`
  Sets the name pattern.
  `void`
  `setUnless(Object cond)`
  Sets the unless attribute.
  `void`
  `setUnless(String cond)`
  Sets the unless attribute.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### NameEntry

    public NameEntry()

- ## Method Details

  - ### setName

    public void setName(String name)
    Sets the name pattern.
    Parameters:
      `name` - The pattern string.

  - ### setIf

    public void setIf(Object cond)
    Sets the if attribute. This attribute and the "unless" attribute are used to validate the name, based on the existence of the property or the value of the evaluated property expression.
    Parameters:
      `cond` - A property name or expression. If the expression evaluates to false or no property of its value is present, the name is invalid.
    Since:
      Ant 1.8.0

  - ### setIf

    public void setIf(String cond)
    Sets the if attribute. This attribute and the "unless" attribute are used to validate the name, based on the existence of the property or the value of the evaluated property expression.
    Parameters:
      `cond` - A property name or expression. If the expression evaluates to false or no property of its value is present, the name is invalid.

  - ### setUnless

    public void setUnless(Object cond)
    Sets the unless attribute. This attribute and the "if" attribute are used to validate the name, based on the existence of the property or the value of the evaluated property expression.
    Parameters:
      `cond` - A property name or expression. If the expression evaluates to true or a property of its value is present, the name is invalid.
    Since:
      Ant 1.8.0

  - ### setUnless

    public void setUnless(String cond)
    Sets the unless attribute. This attribute and the "if" attribute are used to validate the name, based on the existence of the property or the value of the evaluated property expression.
    Parameters:
      `cond` - A property name or expression. If the expression evaluates to true or a property of its value is present, the name is invalid.

  - ### getName

    public String getName()
    Returns:
      the name attribute.

  - ### evalName

    public String evalName(Project p)
    This validates the name - checks the if and unless properties.
    Parameters:
      `p` - the current project, used to check the presence or absence of a property.
    Returns:
      the name attribute or null if the "if" or "unless" properties are not/are set.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`
    Returns:
      a printable form of this object.