C# 클래스 HandCoded.Finance.Interval

An Interval is a length of time expressed as an integer multiple of some Period, for example five days or three months.
파일 보기 프로젝트 열기: formicary/fpml-toolkit-csharp 1 사용 예제들

공개 메소드들

메소드 설명
DividesDates ( Date first, Date last ) : bool

Determines if an Interval will divide the time period delimited by two dates exactly.

Equals ( Interval other ) : bool

Compares two Interval instance to see if they contain the same information.

This routine takes into account the equivalence of certain time intervals (e.g. 1Y = 12M and 1W = 7D).

Equals ( object other ) : bool

Compares an Interval instance with another object to see if they contain the same information.

This routine takes into account the equivalence of certain time intervals (e.g. 1Y = 12M and 1W = 7D).

GetHashCode ( ) : int

Produces a hash value for the instance.

Interval ( int multiplier, Period period ) : System

Constructs an Interval from the provided multiplier and time unit.

Interval ( int multiplier, string code ) : System

Constructs an Interval from the provided multiplier and time unit code.

IsMultipleOf ( Interval other ) : bool

Determines if this Interval is an integer multiple of another.

The calculation recognises that a week is seven days and that a year is twelve months. It also allows 1T to match any time period longer than a day and for any time period to be a multiple of 1 day.

Plus ( Interval other ) : Interval

Calculates the result of adding another Interval to this one.

ToString ( ) : string

Creates a debugging string describing the instance.

메소드 상세

DividesDates() 공개 메소드

Determines if an Interval will divide the time period delimited by two dates exactly.
public DividesDates ( Date first, Date last ) : bool
first Date The first date.
last Date The last date.
리턴 bool

Equals() 공개 메소드

Compares two Interval instance to see if they contain the same information.
This routine takes into account the equivalence of certain time intervals (e.g. 1Y = 12M and 1W = 7D).
public Equals ( Interval other ) : bool
other Interval The other Interval instance.
리턴 bool

Equals() 공개 메소드

Compares an Interval instance with another object to see if they contain the same information.
This routine takes into account the equivalence of certain time intervals (e.g. 1Y = 12M and 1W = 7D).
public Equals ( object other ) : bool
other object The to compare with.
리턴 bool

GetHashCode() 공개 메소드

Produces a hash value for the instance.
public GetHashCode ( ) : int
리턴 int

Interval() 공개 메소드

Constructs an Interval from the provided multiplier and time unit.
public Interval ( int multiplier, Period period ) : System
multiplier int The time period multiplier.
period Period The time period unit.
리턴 System

Interval() 공개 메소드

Constructs an Interval from the provided multiplier and time unit code.
public Interval ( int multiplier, string code ) : System
multiplier int The time period unit multiplier.
code string The timer period unit code
리턴 System

IsMultipleOf() 공개 메소드

Determines if this Interval is an integer multiple of another.
The calculation recognises that a week is seven days and that a year is twelve months. It also allows 1T to match any time period longer than a day and for any time period to be a multiple of 1 day.
public IsMultipleOf ( Interval other ) : bool
other Interval The other Interval instance.
리턴 bool

Plus() 공개 메소드

Calculates the result of adding another Interval to this one.
If the two time periods /// cannot be combined.
public Plus ( Interval other ) : Interval
other Interval The Interval to add.
리턴 Interval

ToString() 공개 메소드

Creates a debugging string describing the instance.
public ToString ( ) : string
리턴 string