plan.report
Class Report
java.lang.Object
|
+--plan.report.Report
- public class Report
- extends java.lang.Object
Utility class for printing text-oriented reports to standard output.
Constructor Summary |
private |
Report()
Entirely static class. |
Method Summary |
(package private) static java.lang.String |
customerDesirability(Feature f)
Return a string that expresses the desirability
by customers of the specified feature. |
(package private) static void |
writeFeature(Feature f)
Write details for the given feature. |
static void |
writeFeatures(java.lang.String title,
FeatureList fl)
Write out details for all the features in the specified FeatureList. |
(package private) static void |
writeField(java.lang.String s,
int width)
Write the given string in a filed of the given width. |
static void |
writeHeader(java.lang.String head)
Write the report header. |
static void |
writeSummaryTable(FeatureList[] fl)
Write a table summarizing the number of features and their sizings. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
LINE
private static final java.lang.String LINE
PICT
private static final java.lang.String PICT
HEAD
private static final java.lang.String HEAD
WIDTH_ID
private static final int WIDTH_ID
WIDTH_DESC
private static final int WIDTH_DESC
WIDTH_PRIO
private static final int WIDTH_PRIO
WIDTH_SIZE
private static final int WIDTH_SIZE
WIDTH_CHAMP
private static final int WIDTH_CHAMP
WIDTH_CUST
private static final int WIDTH_CUST
Report
private Report()
- Entirely static class. Ensure no instances are created.
writeHeader
public static void writeHeader(java.lang.String head)
- Write the report header.
- Parameters:
head
- the header message to be printed
writeSummaryTable
public static void writeSummaryTable(FeatureList[] fl)
- Write a table summarizing the number of features and their sizings.
The table has the feature lists along the columns and four rows:
- high priority features
- medium priority features
- low priority features
- all features
Each entry in the table gives the number of features and the sum of the sizings.
- Parameters:
fl
- the variouos FeatureLists comprising the columns
writeFeatures
public static void writeFeatures(java.lang.String title,
FeatureList fl)
- Write out details for all the features in the specified FeatureList.
- Parameters:
title
- a title for this section of the reportfl
- the list of features to print
writeFeature
static void writeFeature(Feature f)
- Write details for the given feature.
- Parameters:
f
- the feature to print
writeField
static void writeField(java.lang.String s,
int width)
- Write the given string in a filed of the given width.
If the length of the string is bigger than the field width,
replace the end of the string by a "...".
- Parameters:
s
- the string to print in the fieldwidth
- the field width
customerDesirability
static java.lang.String customerDesirability(Feature f)
- Return a string that expresses the desirability
by customers of the specified feature.
- Parameters:
f
- the features whose customer desirability is to be returned- Returns:
- a textual expression of the desirability