Package jsl.utilities
Class Responses
- java.lang.Object
-
- jsl.utilities.Responses
-
public abstract class Responses extends java.lang.Object
This class acts like a Map to allow named responses and their associated values to be viewed. Implementors of ResponseMakerIfc are responsible for making instances of this class that are filled appropriately Note: None of the underlying Maps are made. Implementers of sub-classes must create and populate the maps. Attempting to access a map when it has not been created will result in an IllegalStateException. The hasXResponse() methods can be used to check if the response datatype has been defined.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,AcrossReplicationStatisticIfc>
myAcrossReplicationResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a AcrossReplicationStatisticIfc Not allocated unless at least one response is suppliedprotected java.util.Map<java.lang.String,BatchStatisticsIfc>
myBatchStatisticsResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a WithinReplicationStatisticIfc Not allocated unless at least one response is suppliedprotected java.util.Map<java.lang.String,double[]>
myDoubleArrayResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a double[] Not allocated unless at least one response is suppliedprotected java.util.Map<java.lang.String,java.lang.Double>
myDoubleResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a Double Not allocated unless at least one response is suppliedprotected ResponseMakerIfc
myResponseMaker
The ResponseMakerIfc that uses the Responsesprotected java.util.Map<java.lang.String,Responses>
myResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a Responses Not allocated unless at least one response is suppliedprotected java.util.Map<java.lang.String,StatisticAccessorIfc>
myStatisticAccessorResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a StatisticAccessorIfc Not allocated unless at least one response is suppliedprotected java.util.Map<java.lang.String,WithinReplicationStatisticIfc>
myWithinReplicationResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a WithinReplicationStatisticIfc Not allocated unless at least one response is supplied
-
Constructor Summary
Constructors Modifier Constructor Description protected
Responses(ResponseMakerIfc responseMaker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsResponse(java.lang.String key)
Checks if the supplied key is contained in the responsesjava.util.Set<java.lang.String>
getAcrossReplicationResponseKeySet()
Returns an unmodifiable Set of the response's keys for AcrossReplicationStatisticIfc responsesAcrossReplicationStatisticIfc
getAcrossReplicationStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a AcrossReplicationStatisticsIfc.BatchStatisticsIfc
getBatchStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a BatchStatisticsIfc.java.util.Set<java.lang.String>
getBatchStatisticResponseKeySet()
Returns an unmodifiable Set of the response's keys for BatchStatisticIfc responsesdouble[]
getDoubleArrayResponse(java.lang.String key)
Gets the value associated with the supplied key as a double{].double
getDoubleResponse(java.lang.String key)
Gets the value associated with the supplied key as a double.java.util.Set<java.lang.String>
getDoubleResponseArrayKeySet()
Returns an unmodifiable Set of the response's keys for double[] Controlsjava.util.Set<java.lang.String>
getDoubleResponseKeySet()
Returns an unmodifiable Set of the response's keys for ResponsesResponses
getResponse(java.lang.String key)
Gets the value associated with the supplied key as a Responses.ResponseMakerIfc
getResponseMaker()
java.util.Set<java.lang.String>
getResponsesKeySet()
Returns an unmodifiable Set of the response's keys for Responses responsesStatisticAccessorIfc
getStatisticAccessorIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a StatisticAccessorIfc.java.util.Set<java.lang.String>
getStatisticAccessorResponseKeySet()
Returns an unmodifiable Set of the response's keys for StatisticAccessorIfc responsesjava.util.Set<java.lang.String>
getWithinReplicationResponseKeySet()
Returns an unmodifiable Set of the response's keys for WithinReplicationStatisticIfc responsesWithinReplicationStatisticIfc
getWithinReplicationStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a WithinReplicationStatisticsIfc.boolean
hasAcrossReplicationResponse()
Returns true if at least one AcrossReplicationStatisticIfc response has been setboolean
hasBatchStatisticResponse()
Returns true if at least one BatchStatisticIfc response has been setboolean
hasDoubleArrayResponse()
Returns true if at least one double[] response has been setboolean
hasDoubleResponse()
Returns true if at least one Double response has been setboolean
hasResponsesResponse()
Returns true if at least one Responses response has been setboolean
hasStatisticAccessorResponse()
Returns true if at least one StatisticAccessorIfc response has been setboolean
hasWithinReplicationResponse()
Returns true if at least one WithinReplicationStatisticIfc response has been setjava.lang.String
toString()
-
-
-
Field Detail
-
myResponseMaker
protected ResponseMakerIfc myResponseMaker
The ResponseMakerIfc that uses the Responses
-
myDoubleResponses
protected java.util.Map<java.lang.String,java.lang.Double> myDoubleResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a Double Not allocated unless at least one response is supplied
-
myDoubleArrayResponses
protected java.util.Map<java.lang.String,double[]> myDoubleArrayResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a double[] Not allocated unless at least one response is supplied
-
myStatisticAccessorResponses
protected java.util.Map<java.lang.String,StatisticAccessorIfc> myStatisticAccessorResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a StatisticAccessorIfc Not allocated unless at least one response is supplied
-
myAcrossReplicationResponses
protected java.util.Map<java.lang.String,AcrossReplicationStatisticIfc> myAcrossReplicationResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a AcrossReplicationStatisticIfc Not allocated unless at least one response is supplied
-
myWithinReplicationResponses
protected java.util.Map<java.lang.String,WithinReplicationStatisticIfc> myWithinReplicationResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a WithinReplicationStatisticIfc Not allocated unless at least one response is supplied
-
myBatchStatisticsResponses
protected java.util.Map<java.lang.String,BatchStatisticsIfc> myBatchStatisticsResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a WithinReplicationStatisticIfc Not allocated unless at least one response is supplied
-
myResponses
protected java.util.Map<java.lang.String,Responses> myResponses
The Map that hold the responses as pairs key = name of response value = value of the response as a Responses Not allocated unless at least one response is supplied
-
-
Constructor Detail
-
Responses
protected Responses(ResponseMakerIfc responseMaker)
- Parameters:
responseMaker
-
-
-
Method Detail
-
getResponseMaker
public ResponseMakerIfc getResponseMaker()
- Returns:
-
getDoubleResponse
public double getDoubleResponse(java.lang.String key)
Gets the value associated with the supplied key as a double. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
getResponse
public Responses getResponse(java.lang.String key)
Gets the value associated with the supplied key as a Responses. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
getStatisticAccessorIfcResponse
public StatisticAccessorIfc getStatisticAccessorIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a StatisticAccessorIfc. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
getDoubleArrayResponse
public double[] getDoubleArrayResponse(java.lang.String key)
Gets the value associated with the supplied key as a double{]. The key must already exist in the responses and cannot be null. A copy of the stored double[] is returned.- Parameters:
key
-- Returns:
-
getAcrossReplicationStatisticIfcResponse
public AcrossReplicationStatisticIfc getAcrossReplicationStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a AcrossReplicationStatisticsIfc. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
getWithinReplicationStatisticIfcResponse
public WithinReplicationStatisticIfc getWithinReplicationStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a WithinReplicationStatisticsIfc. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
getBatchStatisticIfcResponse
public BatchStatisticsIfc getBatchStatisticIfcResponse(java.lang.String key)
Gets the value associated with the supplied key as a BatchStatisticsIfc. The key must already exist in the responses and cannot be null.- Parameters:
key
-- Returns:
-
containsResponse
public boolean containsResponse(java.lang.String key)
Checks if the supplied key is contained in the responses- Parameters:
key
-- Returns:
-
hasBatchStatisticResponse
public boolean hasBatchStatisticResponse()
Returns true if at least one BatchStatisticIfc response has been set- Returns:
-
hasWithinReplicationResponse
public boolean hasWithinReplicationResponse()
Returns true if at least one WithinReplicationStatisticIfc response has been set- Returns:
-
hasAcrossReplicationResponse
public boolean hasAcrossReplicationResponse()
Returns true if at least one AcrossReplicationStatisticIfc response has been set- Returns:
-
hasDoubleResponse
public boolean hasDoubleResponse()
Returns true if at least one Double response has been set- Returns:
-
hasDoubleArrayResponse
public boolean hasDoubleArrayResponse()
Returns true if at least one double[] response has been set- Returns:
-
hasResponsesResponse
public boolean hasResponsesResponse()
Returns true if at least one Responses response has been set- Returns:
-
hasStatisticAccessorResponse
public boolean hasStatisticAccessorResponse()
Returns true if at least one StatisticAccessorIfc response has been set- Returns:
-
getAcrossReplicationResponseKeySet
public java.util.Set<java.lang.String> getAcrossReplicationResponseKeySet()
Returns an unmodifiable Set of the response's keys for AcrossReplicationStatisticIfc responses- Returns:
-
getWithinReplicationResponseKeySet
public java.util.Set<java.lang.String> getWithinReplicationResponseKeySet()
Returns an unmodifiable Set of the response's keys for WithinReplicationStatisticIfc responses- Returns:
-
getBatchStatisticResponseKeySet
public java.util.Set<java.lang.String> getBatchStatisticResponseKeySet()
Returns an unmodifiable Set of the response's keys for BatchStatisticIfc responses- Returns:
-
getStatisticAccessorResponseKeySet
public java.util.Set<java.lang.String> getStatisticAccessorResponseKeySet()
Returns an unmodifiable Set of the response's keys for StatisticAccessorIfc responses- Returns:
-
getResponsesKeySet
public java.util.Set<java.lang.String> getResponsesKeySet()
Returns an unmodifiable Set of the response's keys for Responses responses- Returns:
-
getDoubleResponseKeySet
public java.util.Set<java.lang.String> getDoubleResponseKeySet()
Returns an unmodifiable Set of the response's keys for Responses- Returns:
-
getDoubleResponseArrayKeySet
public java.util.Set<java.lang.String> getDoubleResponseArrayKeySet()
Returns an unmodifiable Set of the response's keys for double[] Controls- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-