Struct amfnengine::core::list_amortization::ListAmortization[]

pub struct ListAmortization { /* fields omitted */ }

Implementations

impl ListAmortization

List of amortization elements implementation.

pub fn new() -> ListAmortization

Create and return a new list of amortization elements.

Return

  • See description.

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

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

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

Get the type of the amortization element.

Return

  • See description.

pub fn event_type(&self) -> &str

Get the event type information.

Return

  • See description.

pub fn orig_date(&self) -> usize

Get the date of the original event in YYYYMMDD format.

Return

  • See description.

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

Get the sort order within the amortization element date (minor sort key).

Return

  • See description.

pub fn orig_value(&self) -> Decimal

Get the value of the original event.

Return

  • See description.

pub fn value(&self) -> Decimal

Get the constant value or the result of an expression.

Return

  • See description.

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

Get the periods of the amortization element.

Return

  • See description.

pub fn intervals(&self) -> usize

Get the optional intervals of frequency between periods.

Return

  • See description.

pub fn frequency(&self) -> FrequencyType

Get the frequency of the amortization element.

Return

  • See description.

pub fn principal_decrease(&self) -> Decimal

Get the principal decrease for period.

Return

  • See description.

pub fn principal_increase(&self) -> Decimal

Get the principal increase for period.

Return

  • See description.

pub fn interest(&self) -> Decimal

Get the compounded interest for period.

Return

  • See description.

pub fn sl_interest(&self) -> Decimal

Get the straight-line interest for period.

Return

  • See description.

pub fn value_to_interest(&self) -> Decimal

Get the value to interest for period.

Return

  • See description.

pub fn value_to_principal(&self) -> Decimal

Get the value to principal for period.

Return

  • See description.

pub fn acc_balance(&self) -> Decimal

Get the accrued interest balance.

Return

  • See description.

pub fn balance(&self) -> Decimal

Get the active balance.

Return

  • See description.

pub fn list_event_index(&self) -> usize

Get the index of the original event within the event list.

Return

  • See description.

pub fn event_sequence(&self) -> usize

Get the sequence number within the event starting from 1.

Return

  • See description.

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

Get the extension.

Return

  • See description.

pub fn list_parameter(&self) -> Option<&ListParameter>

Get the amortization parameter list.

Return

  • See description.

pub fn list_descriptor(&self) -> Option<&ListDescriptor>

Get the amortization descriptor list.

Return

  • See description.

pub fn remove(&mut self) -> bool

Remove the selected event from the amortization list.

Return

  • True if successful, otherwise false.

pub fn set_all_index_values(
    &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)

Set the value of all amortization interest events.

Arguments

  • value_param - New value.

pub fn set_value(&mut self, value_param: Decimal) -> bool

Set the constant value or the result of an expression.

Arguments

  • value_param - See description.

pub fn set_principal_decrease(
    &mut self,
    principal_decrease_param: Decimal
) -> bool

Set the principal decrease for period.

Arguments

  • principal_decrease_param - See description.

pub fn set_principal_increase(
    &mut self,
    principal_increase_param: Decimal
) -> bool

Set the principal increase for period.

Arguments

  • principal_increase_param - See description.

pub fn set_interest(&mut self, interest_param: Decimal) -> bool

Set the compounded interest for period.

Arguments

  • interest_param - See description.

pub fn set_sl_interest(&mut self, sl_interest_param: Decimal) -> bool

Set the straight-line interest for period.

Arguments

  • sl_interest_param - See description.

pub fn set_value_to_interest(
    &mut self,
    value_to_interest_param: Decimal
) -> bool

Set the value to interest for period.

Arguments

  • value_to_interest_param - See description.

pub fn set_value_to_principal(
    &mut self,
    value_to_principal_param: Decimal
) -> bool

Set the value to principal for period.

Arguments

  • value_to_principal_param - See description.

pub fn set_acc_balance(&mut self, acc_balance_param: Decimal) -> bool

Set the accrued interest balance.

Arguments

  • acc_balance_param - See description.

pub fn set_balance(&mut self, balance_param: Decimal) -> bool

Set the active balance.

Arguments

  • balance_param - See description.

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.

fn default() -> Self

Create and return a new list of amortization elements.

Return

  • See description.

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

Get the count of the amortization list.

Return

  • See description.

fn index(&self) -> usize

Get the index of the selected amortization element (starting from 0).

Return

  • See description.

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

Set the list index.

Arguments

  • index_param - See description.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.