Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.builder
Interface ComparableExpressionBuilder<E extends Comparable<? super E>>

Type Parameters:
E - The Comparable type of values the constructed expressions operate on and/or produces.
All Superinterfaces:
Copyable<ExpressionBuilder<E>>, ExpressionBuilder<E>, StrictCopyable<ExpressionBuilder<E>>
All Known Implementing Classes:
CountingComparableExpressionBuilder, StandardComparableExpressionBuilder, TypedComparableExpressionBuilder

@ParticipantUsage(value="Product",
                  type=Expression.class)
@Participant(value="Builder")
public interface ComparableExpressionBuilder<E extends Comparable<? super E>>
extends ExpressionBuilder<E>

A comparable expression builder construct various Expression types having a Comparable bound on the value produced by the constructed expressions and/or on the expression operands used.

The constructed root expression can be fetched using the ExpressionBuilder.getRootExpression() method, and expressions can be added to it using the ExpressionBuilder.buildExpression(Expression) method.

Author:
Gunni Rode / rode.dk

Method Summary
 Expression<Boolean> buildGreaterThanExpression(Expression<E> first, Expression<E> second)
          Builds a new GREATER THAN expression.
 Expression<E> buildSetExpression(Expression<E> value)
          Builds a new SET expression.
 Expression<Boolean> buildSmallerThanExpression(Expression<E> first, Expression<E> second)
          Builds a new SMALLER THAN expression.
 
Methods inherited from interface dk.rode.thesis.builder.ExpressionBuilder
buildAndExpression, buildAssignmentExpression, buildBreakExpression, buildConditionalExpression, buildConstantExpression, buildCurrentExpression, buildEqualExpression, buildExpression, buildFlowExpression, buildInitialisedFlowExpression, buildNextExpression, buildNonShortCircuitAndExpression, buildNonShortCircuitOrExpression, buildNotExpression, buildOrExpression, buildResetExpression, buildReverseExpression, buildVariableExpression, getRootExpression, getSequence
 
Methods inherited from interface dk.rode.thesis.prototype.Copyable
copy
 

Method Detail

buildGreaterThanExpression

Expression<Boolean> buildGreaterThanExpression(Expression<E> first,
                                               Expression<E> second)
Builds a new GREATER THAN expression.

Parameters:
first - The first expression operand; cannot be null.
second - The second expression operand; cannot be null.
Returns:
The constructed expression; never null.
Throws:
NullPointerException - If either expression is null.

buildSetExpression

Expression<E> buildSetExpression(Expression<E> value)
Builds a new SET expression.

Parameters:
value - The expression that will determine the sequence value to fast-forward to for the sequence when the constructed expression is evaluated.
Returns:
The constructed expression; never null.
Throws:
NullPointerException - If value is null.

buildSmallerThanExpression

Expression<Boolean> buildSmallerThanExpression(Expression<E> first,
                                               Expression<E> second)
Builds a new SMALLER THAN expression.

Parameters:
first - The first expression operand; cannot be null.
second - The second expression operand; cannot be null.
Returns:
The constructed expression; never null.
Throws:
NullPointerException - If either expression is null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.