Class ServiceResponseCollection<TResponse extends ServiceResponse>
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.response.ServiceResponseCollection<TResponse>
-
- Type Parameters:
TResponse- The type of response stored in the list.
- All Implemented Interfaces:
Iterable<TResponse>
public final class ServiceResponseCollection<TResponse extends ServiceResponse> extends Object implements Iterable<TResponse>
Represents a strongly typed list of service response.
-
-
Constructor Summary
Constructors Constructor Description ServiceResponseCollection()Initializes a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TResponse response)Adds specified response.intgetCount()Gets the total number of response in the list.Enumeration<TResponse>getEnumerator()Gets the enumerator.ServiceResultgetOverallResult()Gets a value indicating the overall result of the request that generated this response collection.TResponsegetResponseAtIndex(int index)Gets the response at the specified index.Iterator<TResponse>iterator()Returns an iterator over a set of elements of type T.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ServiceResponseCollection
public ServiceResponseCollection()
Initializes a new instance.
-
-
Method Detail
-
add
public void add(TResponse response)
Adds specified response.- Parameters:
response- The response.
-
getCount
public int getCount()
Gets the total number of response in the list.- Returns:
- total number of response in the list.
-
getResponseAtIndex
public TResponse getResponseAtIndex(int index) throws IndexOutOfBoundsException
Gets the response at the specified index.- Parameters:
index- The zero-based index of the response to get.- Returns:
- The response at the specified index.
- Throws:
IndexOutOfBoundsException- the index out of bounds exception
-
getOverallResult
public ServiceResult getOverallResult()
Gets a value indicating the overall result of the request that generated this response collection. If all of the response have their Result property set to Success, OverallResult returns Success. If at least one response has its Result property set to Warning and all other response have their Result property set to Success, OverallResult returns Warning. If at least one response has a its Result set to Error, OverallResult returns Error.- Returns:
- the overall result
-
iterator
public Iterator<TResponse> iterator()
Returns an iterator over a set of elements of type T.- Specified by:
iteratorin interfaceIterable<TResponse extends ServiceResponse>- Returns:
- an Iterator.
-
getEnumerator
public Enumeration<TResponse> getEnumerator()
Gets the enumerator.- Returns:
- the enumerator
-
-