Class OrderByCollection
- java.lang.Object
-
- microsoft.exchange.webservices.data.search.OrderByCollection
-
- All Implemented Interfaces:
Iterable<Map<PropertyDefinitionBase,SortDirection>>
public final class OrderByCollection extends Object implements Iterable<Map<PropertyDefinitionBase,SortDirection>>
Represents an ordered collection of property definitions qualified with a sort direction.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOrderByCollection()Initializes a new instance of the OrderByCollection class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(PropertyDefinitionBase propertyDefinition, SortDirection sortDirection)Adds the specified property definition / sort direction pair to the collection.voidclear()Removes all elements from the collection.protected booleancontains(PropertyDefinitionBase propertyDefinition)Determines whether the collection contains the specified property definition.intcount()Gets the number of elements contained in the collection.Iterator<Map<PropertyDefinitionBase,SortDirection>>getEnumerator()Returns an enumerator that iterates through the collection.Map<PropertyDefinitionBase,SortDirection>getPropertyDefinitionSortDirectionPair(int index)Gets the element at the specified index from the collection.Iterator<Map<PropertyDefinitionBase,SortDirection>>iterator()booleanremove(PropertyDefinitionBase propertyDefinition)Removes the specified property definition from the collection.voidremoveAt(int index)Removes the element at the specified index from the collection.booleantryGetValue(PropertyDefinitionBase propertyDefinition, OutParam<SortDirection> sortDirection)Tries to get the value for a property definition in the collection.protected voidwriteToXml(EwsServiceXmlWriter writer, String xmlElementName)Writes to XML.-
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
-
OrderByCollection
protected OrderByCollection()
Initializes a new instance of the OrderByCollection class.
-
-
Method Detail
-
add
public void add(PropertyDefinitionBase propertyDefinition, SortDirection sortDirection) throws ServiceLocalException
Adds the specified property definition / sort direction pair to the collection.- Parameters:
propertyDefinition- the property definitionsortDirection- the sort direction- Throws:
ServiceLocalException- the service local exception
-
clear
public void clear()
Removes all elements from the collection.
-
contains
protected boolean contains(PropertyDefinitionBase propertyDefinition)
Determines whether the collection contains the specified property definition.- Parameters:
propertyDefinition- the property definition- Returns:
- True if the collection contains the specified property definition; otherwise, false.
-
count
public int count()
Gets the number of elements contained in the collection.- Returns:
- the int
-
remove
public boolean remove(PropertyDefinitionBase propertyDefinition)
Removes the specified property definition from the collection.- Parameters:
propertyDefinition- the property definition- Returns:
- True if the property definition is successfully removed; otherwise, false
-
removeAt
public void removeAt(int index)
Removes the element at the specified index from the collection.- Parameters:
index- the index
-
tryGetValue
public boolean tryGetValue(PropertyDefinitionBase propertyDefinition, OutParam<SortDirection> sortDirection)
Tries to get the value for a property definition in the collection.- Parameters:
propertyDefinition- the property definitionsortDirection- the sort direction- Returns:
- True if collection contains property definition, otherwise false.
-
writeToXml
protected void writeToXml(EwsServiceXmlWriter writer, String xmlElementName) throws XMLStreamException, ServiceXmlSerializationException
Writes to XML.- Parameters:
writer- the writerxmlElementName- the xml element name- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
iterator
public Iterator<Map<PropertyDefinitionBase,SortDirection>> iterator()
- Specified by:
iteratorin interfaceIterable<Map<PropertyDefinitionBase,SortDirection>>
-
getPropertyDefinitionSortDirectionPair
public Map<PropertyDefinitionBase,SortDirection> getPropertyDefinitionSortDirectionPair(int index)
Gets the element at the specified index from the collection.- Parameters:
index- the index- Returns:
- the property definition sort direction pair
-
getEnumerator
public Iterator<Map<PropertyDefinitionBase,SortDirection>> getEnumerator()
Returns an enumerator that iterates through the collection.- Returns:
- A Iterator that can be used to iterate through the collection.
-
-