RateCollection
Inheritance: java.lang.Object, java.util.AbstractMap
All Implemented Interfaces: java.lang.Iterable
public class RateCollection extends AbstractMap<Integer,RateByDateCollection> implements Iterable<Map.Entry<Integer,RateByDateCollection>>
Represents a collection which contains Rate objects.
Methods
Method | Description |
---|---|
add(Date ratesFrom) | Adds a new Rate instance to this collection. |
add(Date ratesFrom, int type) | Adds a new Rate instance to this collection. |
clear() | {@inheritDoc} |
entrySet() | (@inheritDoc} |
get(Object key) | (@inheritDoc} |
getByRateType(int key) | Returns the element at the specified index. |
getParentResource() | Gets the parent Resource object for this collection. |
isReadOnly() | Gets a value indicating whether this collection is read only. |
iterator() | Returns an enumerator for this collection. |
put(Integer key, RateByDateCollection value) | (@inheritDoc} |
remove(Rate item) | Removes Rate instance from this collection. |
setByRateType(int key, RateByDateCollection value) | Sets the element at the specified index. |
size() | Gets the number of elements contained in the RateCollection. |
toList() | Converts the RateCollection object to a list of Rate objects. |
toList(int type) | Converts the RateCollection object to a list of Rate objects filtered by specified RateType type. |
add(Date ratesFrom)
public final Rate add(Date ratesFrom)
Adds a new Rate instance to this collection.
Parameters:
Parameter | Type | Description |
---|---|---|
ratesFrom | java.util.Date | The date the new rate comes into effect. |
Returns: Rate - Added Rate instance.
add(Date ratesFrom, int type)
public final Rate add(Date ratesFrom, int type)
Adds a new Rate instance to this collection.
Parameters:
Parameter | Type | Description |
---|---|---|
ratesFrom | java.util.Date | The date the new rate comes into effect. |
type | int | The rate table to add into. |
Returns: Rate - Added Rate instance.
clear()
public final void clear()
entrySet()
public Set<Map.Entry<Integer,RateByDateCollection>> entrySet()
(@inheritDoc}
Returns: java.util.Set<java.util.Map.Entry<java.lang.Integer,com.aspose.tasks.RateByDateCollection>> - {@inheritDoc}
get(Object key)
public final RateByDateCollection get(Object key)
(@inheritDoc}
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.Object | {@inheritDoc} |
Returns: RateByDateCollection - {@inheritDoc}
getByRateType(int key)
public final RateByDateCollection getByRateType(int key)
Returns the element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
key | int | The zero-based index of the element to get. |
Returns: RateByDateCollection - the element at the specified index.
getParentResource()
public final Resource getParentResource()
Gets the parent Resource object for this collection.
Returns: Resource - the parent Resource object for this collection.
isReadOnly()
public final boolean isReadOnly()
Gets a value indicating whether this collection is read only.
Returns: boolean - a value indicating whether this collection is read only.
iterator()
public final Iterator iterator()
Returns an enumerator for this collection.
Returns: java.util.Iterator - an enumerator for this collection.
put(Integer key, RateByDateCollection value)
public final RateByDateCollection put(Integer key, RateByDateCollection value)
(@inheritDoc}
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.Integer | {@inheritDoc} |
value | RateByDateCollection | {@inheritDoc} |
Returns: RateByDateCollection - {@inheritDoc}
remove(Rate item)
public final boolean remove(Rate item)
Removes Rate instance from this collection.
Parameters:
Parameter | Type | Description |
---|---|---|
item | Rate | The item to remove. |
Returns: boolean - true if the specified Rate was removed successfully; otherwise, false.
setByRateType(int key, RateByDateCollection value)
public final void setByRateType(int key, RateByDateCollection value)
Sets the element at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
key | int | The zero-based index of the element to set. |
value | RateByDateCollection | The element to set at the specified index. |
size()
public final int size()
Gets the number of elements contained in the RateCollection.
Returns: int - the number of elements contained in the RateCollection.
toList()
public final List<Rate> toList()
Converts the RateCollection object to a list of Rate objects.
Returns: java.util.List<com.aspose.tasks.Rate> - List of Rate objects.
toList(int type)
public final List<Rate> toList(int type)
Converts the RateCollection object to a list of Rate objects filtered by specified RateType type.
Parameters:
Parameter | Type | Description |
---|---|---|
type | int | The type to filter on. |
Returns: java.util.List<com.aspose.tasks.Rate> - a list of Rate objects.