public class RateCollection extends AbstractMap<Integer,RateByDateCollection> implements Iterable<Map.Entry<Integer,RateByDateCollection>>
Represents a collection which contains Rate
objects.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Method and Description |
---|---|
Rate |
add(Date ratesFrom)
Adds a new
Rate instance to this collection. |
Rate |
add(Date ratesFrom,
int type)
Adds a new
Rate instance to this collection. |
void |
clear() |
Set<Map.Entry<Integer,RateByDateCollection>> |
entrySet()
(@inheritDoc}
|
RateByDateCollection |
get(Object key)
(@inheritDoc}
|
RateByDateCollection |
getByRateType(int key)
Returns the element at the specified index.
|
Resource |
getParentResource()
Gets the parent
Resource object for this collection. |
boolean |
isReadOnly()
Gets a value indicating whether this collection is read only.
|
com.aspose.ms.System.Collections.IEnumerator |
iterator()
Returns an enumerator for this collection.
|
RateByDateCollection |
put(Integer key,
RateByDateCollection value)
(@inheritDoc}
|
boolean |
remove(Rate item)
Removes Rate instance from this collection.
|
void |
setByRateType(int key,
RateByDateCollection value)
Sets the element at the specified index.
|
int |
size()
Gets the number of elements contained in the RateCollection.
|
List<Rate> |
toList()
Converts the
RateCollection object to a list of Rate objects. |
List<Rate> |
toList(int type)
|
containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, toString, values
forEach, spliterator
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public final Rate add(Date ratesFrom)
Adds a new Rate
instance to this collection.
ratesFrom
- The date the new rate comes into effect.Rate
instance.public final Rate add(Date ratesFrom, int type)
Adds a new Rate
instance to this collection.
ratesFrom
- The date the new rate comes into effect.type
- The rate table to add into.Rate
instance.public final void clear()
clear
in interface Map<Integer,RateByDateCollection>
clear
in class AbstractMap<Integer,RateByDateCollection>
public Set<Map.Entry<Integer,RateByDateCollection>> entrySet()
entrySet
in interface Map<Integer,RateByDateCollection>
entrySet
in class AbstractMap<Integer,RateByDateCollection>
public final RateByDateCollection getByRateType(int key)
Returns the element at the specified index.
key
- The zero-based index of the element to get.public final Resource getParentResource()
Gets the parent Resource
object for this collection.
Resource
object for this collection.public final boolean isReadOnly()
Gets a value indicating whether this collection is read only.
public final com.aspose.ms.System.Collections.IEnumerator iterator()
Returns an enumerator for this collection.
iterator
in interface Iterable<Map.Entry<Integer,RateByDateCollection>>
public final boolean remove(Rate item)
Removes Rate instance from this collection.
item
- The item to remove.public final void setByRateType(int key, RateByDateCollection value)
Sets the element at the specified index.
key
- The zero-based index of the element to set.value
- The element to set at the specified index.public final int size()
Gets the number of elements contained in the RateCollection.
size
in interface Map<Integer,RateByDateCollection>
size
in class AbstractMap<Integer,RateByDateCollection>
public final List<Rate> toList()
Converts the RateCollection
object to a list of Rate
objects.
Rate
objects.public final List<Rate> toList(int type)
Converts the RateCollection
object to a list of Rate
objects filtered by specified RateType
type.
type
- The type to filter on.Rate
objects.public final RateByDateCollection get(Object key)
get
in interface Map<Integer,RateByDateCollection>
get
in class AbstractMap<Integer,RateByDateCollection>
key
- public final RateByDateCollection put(Integer key, RateByDateCollection value)
put
in interface Map<Integer,RateByDateCollection>
put
in class AbstractMap<Integer,RateByDateCollection>
key
- value
-