Qwylt

java.lang.module.spi.query
Class AttributeEquals

java.lang.Object
  extended by java.lang.module.ModuleQuery
      extended by java.lang.module.spi.query.AttributeExists
          extended by java.lang.module.spi.query.AttributeEquals
All Implemented Interfaces:
java.lang.Iterable<ModuleQuery>, Matcher<ModuleArchive>

public class AttributeEquals
extends AttributeExists

A ModuleQuery that tests whether or not an attribute exists in a ModuleArchive and that the values are equal.

Since:
Dec 12, 2008
Author:
Bryan Atsatt

Field Summary
 
Fields inherited from class java.lang.module.ModuleQuery
ANY, NONE
 
Constructor Summary
AttributeEquals(java.lang.String attributeName, java.lang.String attributeValue)
          Constructor.
 
Method Summary
 java.lang.String getAttributeValue()
          Returns the attribute value.
 boolean matches(ModuleArchive target)
          Tests if the specified target matches this instance.
 java.lang.String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.module.spi.query.AttributeExists
getAttributeName
 
Methods inherited from class java.lang.module.ModuleQuery
addTo, addTo, and, and, any, asList, attributeEquals, attributeExists, exports, exportsPackage, exportsPackage, find, find, findIndexable, instanceOf, iterator, moduleNameAndVersionMatch, moduleNameEquals, not, not, or, or, versionMatches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeEquals

public AttributeEquals(java.lang.String attributeName,
                       java.lang.String attributeValue)
Constructor.

Parameters:
attributeName - The attribute name.
attributeValue - The attribute value to match.
Method Detail

getAttributeValue

public java.lang.String getAttributeValue()
Returns the attribute value.

Returns:
The attribute value.

matches

public boolean matches(ModuleArchive target)
Tests if the specified target matches this instance.

Specified by:
matches in interface Matcher<ModuleArchive>
Overrides:
matches in class AttributeExists
Parameters:
target - The target instance.
Returns:
true if the specified target matches this instance; false otherwise.

toString

public java.lang.String toString()
Returns a string representation of this instance.

Overrides:
toString in class AttributeExists
Returns:
The string.

Qwylt

Send comments or questions to Bryan Atsatt