Verified Owner
Top Description Fields Constructors Methods
org.jabref.model.entry

public final Enum Season

extends Enum<Season>
Class Inheritance
Annotations
@AllowedToUseLogic:Uses StringUtil temporarily
Imports
java.util.Optional, org.jabref.architecture.AllowedToUseLogic, org.jabref.logic.util.strings.StringUtil

Represents a Season of the Year.

Field Summary

Modifier and TypeField and Description
public static final Season
private final String
private final int
public static final Season
public static final Season
public static final Season

Constructor Summary

AccessConstructor and Description
private
Season(String name, int number)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

Season
getName
()

Returns the name of the long in unabbreviated english.

public int

Returns:

number of the season in the Year
getNumber
()

Returns the number of the Season: SPRING -> 21, SUMMER -> 22 etc.

public static Optional<Season>
getSeasonByName(String
spring, summer, autumn, winter
name
)

Find season by name case-insensitive.

public static Optional<Season>
getSeasonByNumber(int
21-24 is valid
number
)

Find season by number.

public static Optional<Season>

Returns:

the corresponding Season instance
parse
(String
the given value
value
)

This method accepts three types of seasons:

  • Double Digit seasons from 21 to 24
  • Full English Season identifiers.
pack-priv static Optional<Season>

Returns:

the corresponding season instance, empty if input is not in German form
parseGermanSeason
(String
a String that represents a season in German form
value
)

Parses a season having the string in German standard form

public static Season
public static Season[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AUTUMNback to summary
public static final Season AUTUMN
nameback to summary
private final String name

Hides java.lang.Enum.name.

numberback to summary
private final int number
SPRINGback to summary
public static final Season SPRING
SUMMERback to summary
public static final Season SUMMER
WINTERback to summary
public static final Season WINTER

Constructor Detail

Seasonback to summary
private Season(String name, int number)

Method Detail

getNameback to summary
public String getName()

Returns the name of the long in unabbreviated english.

Returns:String

Season

getNumberback to summary
public int getNumber()

Returns the number of the Season: SPRING -> 21, SUMMER -> 22 etc.

Returns:int

number of the season in the Year

getSeasonByNameback to summary
public static Optional<Season> getSeasonByName(String name)

Find season by name case-insensitive. If no matching season is found, then an empty Optional is returned.

Parameters
name:String

spring, summer, autumn, winter

getSeasonByNumberback to summary
public static Optional<Season> getSeasonByNumber(int number)

Find season by number. If the number is not in the valid range, then an empty Optional is returned.

Parameters
number:int

21-24 is valid

parseback to summary
public static Optional<Season> parse(String value)

This method accepts three types of seasons:

  • Double Digit seasons from 21 to 24
  • Full English Season identifiers.
Parameters
value:String

the given value

Returns:Optional<Season>

the corresponding Season instance

parseGermanSeasonback to summary
pack-priv static Optional<Season> parseGermanSeason(String value)

Parses a season having the string in German standard form

Parameters
value:String

a String that represents a season in German form

Returns:Optional<Season>

the corresponding season instance, empty if input is not in German form

valueOfback to summary
public static Season valueOf(String name)
valuesback to summary
public static Season[] values()