Qwylt

java.lang.module.spi.query
Class Binary

java.lang.Object
  extended by java.lang.module.ModuleQuery
      extended by java.lang.module.spi.query.Binary
All Implemented Interfaces:
java.lang.Iterable<ModuleQuery>, Matcher<ModuleArchive>
Direct Known Subclasses:
And, Or

public abstract class Binary
extends ModuleQuery

An abstract ModuleQuery that matches two other ModuleQuery instances.

Since:
Dec 12, 2008
Author:
Bryan Atsatt

Field Summary
 
Fields inherited from class java.lang.module.ModuleQuery
ANY, NONE
 
Constructor Summary
protected Binary(ModuleQuery leftChild, ModuleQuery rightChild)
          Constructor.
 
Method Summary
protected  java.util.List<ModuleQuery> addTo(java.util.List<ModuleQuery> list)
          Add this ModuleQuery and any children to the specified list.
protected
<T extends ModuleQuery>
Indexable<T>
find(Indexable<T> indexable)
          Match this ModuleQuery and any children against the specified Indexable, stopping at the first match.
 ModuleQuery getLeftChild()
          Returns the left query.
 ModuleQuery getRightChild()
          Returns the right query.
 
Methods inherited from class java.lang.module.ModuleQuery
addTo, and, and, any, asList, attributeEquals, attributeExists, exports, exportsPackage, exportsPackage, find, findIndexable, instanceOf, iterator, matches, moduleNameAndVersionMatch, moduleNameEquals, not, not, or, or, versionMatches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Binary

protected Binary(ModuleQuery leftChild,
                 ModuleQuery rightChild)
Constructor.

Parameters:
leftChild - The left child.
rightChild - The right child.
Method Detail

getLeftChild

public ModuleQuery getLeftChild()
Returns the left query.

Returns:
The left query.

getRightChild

public ModuleQuery getRightChild()
Returns the right query.

Returns:
The right query.

addTo

protected java.util.List<ModuleQuery> addTo(java.util.List<ModuleQuery> list)
Add this ModuleQuery and any children to the specified list.

Overrides:
addTo in class ModuleQuery
Parameters:
list - The list to add to.
Returns:
The list.

find

protected <T extends ModuleQuery> Indexable<T> find(Indexable<T> indexable)
Match this ModuleQuery and any children against the specified Indexable, stopping at the first match.

Overrides:
find in class ModuleQuery
Parameters:
indexable - The indexable to match.
Returns:
The indexable.

Qwylt

Send comments or questions to Bryan Atsatt