java.lang.Object
me.gosimple.nbvcxz.matching.match.BaseMatch
me.gosimple.nbvcxz.matching.match.DateMatch
- All Implemented Interfaces:
Match
public final class DateMatch extends BaseMatch
- Author:
- Adam Brusselback
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DateMatch(java.lang.String match, Configuration configuration, int day, int month, int year, java.lang.String separator, int start_index, int end_index)Create a newDateMatch -
Method Summary
Modifier and Type Method Description intgetDay()java.lang.StringgetDetails()Returns details about this match in the form of a String to be printed directlyintgetMonth()java.lang.StringgetSeparator()intgetYear()Methods inherited from class me.gosimple.nbvcxz.matching.match.BaseMatch
calculateEntropy, getAverageEntropy, getEndIndex, getLength, getStartIndex, getToken, log2, nCk, setEntropy
-
Constructor Details
-
DateMatch
public DateMatch(java.lang.String match, Configuration configuration, int day, int month, int year, java.lang.String separator, int start_index, int end_index)Create a newDateMatch- Parameters:
match- theStringwe are creating theDateMatchfrom.configuration- theConfigurationobject.day- the day of monthmonth- the monthyear- the yearseparator- separator usedstart_index- the start index in the password for this match.end_index- the end index in the password for this match.
-
-
Method Details
-
getDay
public int getDay()- Returns:
- the
intday of the match.
-
getMonth
public int getMonth()- Returns:
- the
intmonth of the match.
-
getYear
public int getYear()- Returns:
- the
intyear of the match.
-
getSeparator
public java.lang.String getSeparator()- Returns:
- the
Stringcharacter between each date component
-
getDetails
public java.lang.String getDetails()Description copied from interface:MatchReturns details about this match in the form of a String to be printed directly- Specified by:
getDetailsin interfaceMatch- Overrides:
getDetailsin classBaseMatch- Returns:
- all specific details about this
Matchin printable String format.
-