org.sadun.util
Class TelnetInputStreamConsumer.OrCriterium

java.lang.Object
  extended byorg.sadun.util.TelnetInputStreamConsumer.CompositeCriterium
      extended byorg.sadun.util.TelnetInputStreamConsumer.OrCriterium
All Implemented Interfaces:
TelnetInputStreamConsumer.Criterium
Enclosing class:
TelnetInputStreamConsumer

public static class TelnetInputStreamConsumer.OrCriterium
extends TelnetInputStreamConsumer.CompositeCriterium

A criterium which holds if one of its composing criteria hold.

Version:
1.0
Author:
Cristiano Sadun

Field Summary
 
Fields inherited from class org.sadun.util.TelnetInputStreamConsumer.CompositeCriterium
operands, verifyAllRequested
 
Constructor Summary
TelnetInputStreamConsumer.OrCriterium(TelnetInputStreamConsumer.Criterium[] criteria)
           
TelnetInputStreamConsumer.OrCriterium(TelnetInputStreamConsumer.Criterium c1, TelnetInputStreamConsumer.Criterium c2)
           
 
Method Summary
 boolean holdsMultiple(java.lang.String input)
          This method is to be implemented by subclasses to do the actual verification of the multiple criterium.
 java.lang.String toString()
           
 
Methods inherited from class org.sadun.util.TelnetInputStreamConsumer.CompositeCriterium
getHoldingCriteria, getHoldingCriterium, getNotHoldingCriteria, getUndefinedCriteria, holds, isVerified, isVerifiedAndDoesNotHold, isVerifiedAndHolds, isVerifyAllRequested, setVerifyAllRequested
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TelnetInputStreamConsumer.OrCriterium

public TelnetInputStreamConsumer.OrCriterium(TelnetInputStreamConsumer.Criterium c1,
                                             TelnetInputStreamConsumer.Criterium c2)

TelnetInputStreamConsumer.OrCriterium

public TelnetInputStreamConsumer.OrCriterium(TelnetInputStreamConsumer.Criterium[] criteria)
Method Detail

holdsMultiple

public boolean holdsMultiple(java.lang.String input)
Description copied from class: TelnetInputStreamConsumer.CompositeCriterium
This method is to be implemented by subclasses to do the actual verification of the multiple criterium.

It has the same role as TelnetInputStreamConsumer.Criterium.holds(java.lang.String) in TelnetInputStreamConsumer.Criterium

Specified by:
holdsMultiple in class TelnetInputStreamConsumer.CompositeCriterium
Parameters:
input - the input to verify
Returns:
true if the multiple criterium is verified.

toString

public java.lang.String toString()