Struct amfnengine::core::list_amortization::ListAmortization [−]
Implementations
impl ListAmortization
List of amortization elements implementation.
pub fn new() -> ListAmortization
pub fn add_amortization(
&mut self,
event_type_param: &str,
orig_date_param: usize,
event_date_param: usize,
sort_order_param: usize,
value_param: Decimal,
value_expr_param: &str,
periods_param: usize,
intervals_param: usize,
frequency_param: FrequencyType,
principal_decrease_param: Decimal,
principal_increase_param: Decimal,
list_event_index_param: usize,
event_sequence_param: usize,
stat_sequence_param: usize,
elem_extension_param: ElemExtension,
list_parameter_param: Option<ListParameter>,
list_descriptor_param: Option<ListDescriptor>
) -> bool
&mut self,
event_type_param: &str,
orig_date_param: usize,
event_date_param: usize,
sort_order_param: usize,
value_param: Decimal,
value_expr_param: &str,
periods_param: usize,
intervals_param: usize,
frequency_param: FrequencyType,
principal_decrease_param: Decimal,
principal_increase_param: Decimal,
list_event_index_param: usize,
event_sequence_param: usize,
stat_sequence_param: usize,
elem_extension_param: ElemExtension,
list_parameter_param: Option<ListParameter>,
list_descriptor_param: Option<ListDescriptor>
) -> bool
Add a new amortization element into the amortization list.
Arguments
event_type_param
- Event type.orig_date_param
- Original date.event_date_param
- Event date.sort_order_param
- Sort order.value_param
- Value parameter.value_expr_param
- Value expression parameter.periods_param
- Periods parameter.intervals_param
- Intervals parameter.frequency_param
- Frequency parameter.principal_decrease_param
- Principal decrease.principal_increase_param
- Principal increase.list_event_index_param
- List event index.event_sequence_param
- Event sequence.stat_sequence_param
- Event stat sequence.extension_param
- Extension (current value, interest change, principal change, statistic value).list_parameter_param
- List parameter.list_descriptor_param
- List descriptor.
Return
- True if successful, otherwise false.
pub fn add_amortization_ex(
&mut self,
event_type_param: &str,
orig_date_param: usize,
event_date_param: usize,
sort_order_param: usize,
value_param: Decimal,
value_expr_param: &str,
periods_param: usize,
intervals_param: usize,
frequency_param: FrequencyType,
principal_decrease_param: Decimal,
principal_increase_param: Decimal,
interest_param: Decimal,
sl_interest_param: Decimal,
value_to_interest_param: Decimal,
value_to_principal_param: Decimal,
acc_balance_param: Decimal,
balance_param: Decimal,
list_event_index_param: usize,
event_sequence_param: usize,
stat_sequence_param: usize,
elem_extension_param: ElemExtension,
list_parameter_param: Option<ListParameter>,
list_descriptor_param: Option<ListDescriptor>
) -> bool
&mut self,
event_type_param: &str,
orig_date_param: usize,
event_date_param: usize,
sort_order_param: usize,
value_param: Decimal,
value_expr_param: &str,
periods_param: usize,
intervals_param: usize,
frequency_param: FrequencyType,
principal_decrease_param: Decimal,
principal_increase_param: Decimal,
interest_param: Decimal,
sl_interest_param: Decimal,
value_to_interest_param: Decimal,
value_to_principal_param: Decimal,
acc_balance_param: Decimal,
balance_param: Decimal,
list_event_index_param: usize,
event_sequence_param: usize,
stat_sequence_param: usize,
elem_extension_param: ElemExtension,
list_parameter_param: Option<ListParameter>,
list_descriptor_param: Option<ListDescriptor>
) -> bool
Add a new amortization element into the amortization list.
Arguments
event_type_param
- Event type.orig_date_param
- Original date.event_date_param
- Event date.sort_order_param
- Sort order.value_param
- Value parameter.value_expr_param
- Value expression parameter.periods_param
- Periods parameter.intervals_param
- Intervals parameter.frequency_param
- Frequency parameter.principal_decrease_param
- Principal decrease.principal_increase_param
- Principal increase.interest_param
- Compounded interest.sl_interest_param
- Straight-line interest.value_to_interest_param
- Value to interest.value_to_principal_param
- Value to principal.acc_balance_param
- Accrued interest balance at start of event.balance_param
- Beginning active balance at start of event.list_event_index_param
- List event index.event_sequence_param
- Event sequence.stat_sequence_param
- Event stat sequence.extension_param
- Extension (current value, interest change, principal change, statistic value).list_parameter_param
- List parameter.list_descriptor_param
- List descriptor.
Return
- True if successful, otherwise false.
pub fn copy(&self, updating_json: bool) -> ListAmortization
Copy this list of amortization elements and return a new list of amortization elements.
Arguments
updating_json
- Updating from json.
Return
- See description.
pub fn elem_type(&self) -> ExtensionType
pub fn event_type(&self) -> &str
pub fn orig_date(&self) -> usize
pub fn event_date(&self) -> usize
Get the date of the amortization element in YYYYMMDD format (major sort key).
Return
- See description.
pub fn sort_order(&self) -> usize
pub fn orig_value(&self) -> Decimal
pub fn value(&self) -> Decimal
pub fn value_expr(&self) -> &str
Get the optional value expression evaluated when the amortization list is balanced.
Return
- See description.
pub fn periods(&self) -> usize
pub fn intervals(&self) -> usize
pub fn frequency(&self) -> FrequencyType
pub fn principal_decrease(&self) -> Decimal
pub fn principal_increase(&self) -> Decimal
pub fn interest(&self) -> Decimal
pub fn sl_interest(&self) -> Decimal
pub fn value_to_interest(&self) -> Decimal
pub fn value_to_principal(&self) -> Decimal
pub fn acc_balance(&self) -> Decimal
pub fn balance(&self) -> Decimal
pub fn list_event_index(&self) -> usize
pub fn event_sequence(&self) -> usize
pub fn stat_sequence(&self) -> usize
Get the sequence number of principal change with statistics set or 0 (if not applicable).
Return
- See description.
pub fn elem_extension(&self) -> &ElemExtension
pub fn list_parameter(&self) -> Option<&ListParameter>
pub fn list_descriptor(&self) -> Option<&ListDescriptor>
pub fn remove(&mut self) -> bool
pub fn set_all_index_values(
&mut self,
event_index_param: usize,
value_param: Decimal
)
&mut self,
event_index_param: usize,
value_param: Decimal
)
Set the value of all amortization elements having a specified original event index.
Arguments
index_param
- Original event index.value_param
- New value.
pub fn set_all_interest_values(&mut self, value_param: Decimal)
pub fn set_value(&mut self, value_param: Decimal) -> bool
pub fn set_principal_decrease(
&mut self,
principal_decrease_param: Decimal
) -> bool
&mut self,
principal_decrease_param: Decimal
) -> bool
pub fn set_principal_increase(
&mut self,
principal_increase_param: Decimal
) -> bool
&mut self,
principal_increase_param: Decimal
) -> bool
pub fn set_interest(&mut self, interest_param: Decimal) -> bool
pub fn set_sl_interest(&mut self, sl_interest_param: Decimal) -> bool
pub fn set_value_to_interest(
&mut self,
value_to_interest_param: Decimal
) -> bool
&mut self,
value_to_interest_param: Decimal
) -> bool
pub fn set_value_to_principal(
&mut self,
value_to_principal_param: Decimal
) -> bool
&mut self,
value_to_principal_param: Decimal
) -> bool
pub fn set_acc_balance(&mut self, acc_balance_param: Decimal) -> bool
pub fn set_balance(&mut self, balance_param: Decimal) -> bool
pub fn set_stat_sequence(&mut self, stat_sequence_param: usize) -> bool
Set the sequence number of principal change with statistics set or 0 (if not applicable).
Arguments
stat_sequence_param
- See description.
pub fn sort(&mut self)
Sort the amortization list.
Trait Implementations
impl Default for ListAmortization
List of amortization elements default implementation.
impl ListTrait for ListAmortization
List of amortization elements list implementation.
fn clear(&mut self)
Clear all elements from the amortization list.
fn count(&self) -> usize
fn index(&self) -> usize
fn get_element(&self, index_param: usize) -> bool
Select an amortization element based upon an index value.
Arguments
index_param
- Index value of the amortization element to select (starting from 0).
Return
- True if successful, otherwise false.
fn set_index(&self, index_param: usize) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for ListAmortization
impl Send for ListAmortization
impl !Sync for ListAmortization
impl Unpin for ListAmortization
impl UnwindSafe for ListAmortization
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,