Qwylt

java.lang.module.spi.query
Class VersionMatches

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

public class VersionMatches
extends ModuleQuery

A ModuleQuery that matches the Version returned by a ModuleArchive.

Since:
Dec 12, 2008
Author:
Bryan Atsatt

Field Summary
 
Fields inherited from class java.lang.module.ModuleQuery
ANY, NONE
 
Constructor Summary
VersionMatches(Matcher<Version> versionMatcher)
          Constructor.
 
Method Summary
 Matcher<Version> getVersionMatcher()
          Returns the version matcher.
 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.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

VersionMatches

public VersionMatches(Matcher<Version> versionMatcher)
Constructor.

Parameters:
versionMatcher - The version matcher to match against the version held by a ModuleArchive.
Method Detail

getVersionMatcher

public Matcher<Version> getVersionMatcher()
Returns the version matcher.

Returns:
The version matcher.

matches

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

Specified by:
matches in interface Matcher<ModuleArchive>
Specified by:
matches in class ModuleQuery
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 java.lang.Object
Returns:
The string.

Qwylt

Send comments or questions to Bryan Atsatt