BrightSide Workbench Full Report + Source Code
org.turro.financials.cart.delivery.StreetItem Class Reference
Inheritance diagram for org.turro.financials.cart.delivery.StreetItem:
Collaboration diagram for org.turro.financials.cart.delivery.StreetItem:

Public Member Functions

 StreetItem (String city, String zipcode, String street, Range< Integer > even, Range< Integer > odd)
 
String getCity ()
 
String getZipcode ()
 
String getStreet ()
 
Range< Integer > getEven ()
 
Range< Integer > getOdd ()
 
boolean matches (String search)
 

Static Public Member Functions

static StreetItem parseLine (String line)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file StreetItem.java.

Constructor & Destructor Documentation

◆ StreetItem()

org.turro.financials.cart.delivery.StreetItem.StreetItem ( String  city,
String  zipcode,
String  street,
Range< Integer >  even,
Range< Integer >  odd 
)

Definition at line 72 of file StreetItem.java.

72  {
73  this.city = city;
74  this.zipcode = zipcode;
75  this.street = street;
76  this.even = even;
77  this.odd = odd;
78  }
Here is the caller graph for this function:

Member Function Documentation

◆ getCity()

String org.turro.financials.cart.delivery.StreetItem.getCity ( )

Definition at line 80 of file StreetItem.java.

80  {
81  return city;
82  }

◆ getEven()

Range<Integer> org.turro.financials.cart.delivery.StreetItem.getEven ( )

Definition at line 92 of file StreetItem.java.

92  {
93  return even;
94  }

◆ getOdd()

Range<Integer> org.turro.financials.cart.delivery.StreetItem.getOdd ( )

Definition at line 96 of file StreetItem.java.

96  {
97  return odd;
98  }

◆ getStreet()

String org.turro.financials.cart.delivery.StreetItem.getStreet ( )

Definition at line 88 of file StreetItem.java.

88  {
89  return street;
90  }

◆ getZipcode()

String org.turro.financials.cart.delivery.StreetItem.getZipcode ( )

Definition at line 84 of file StreetItem.java.

84  {
85  return zipcode;
86  }

◆ matches()

boolean org.turro.financials.cart.delivery.StreetItem.matches ( String  search)

Definition at line 100 of file StreetItem.java.

100  {
101  return street.matches(".*" + search + ".*");
102  }

◆ parseLine()

static StreetItem org.turro.financials.cart.delivery.StreetItem.parseLine ( String  line)
static

Definition at line 37 of file StreetItem.java.

37  {
38  String[] fields = line.split("\\s*,\\s*");
39  if(fields.length >= 5) {
40  // city, zipcode, street, even, odd
41  String street = fields[2];
42  Matcher matcher = PREFIX.matcher(street);
43  if(matcher.find()) {
44  street = matcher.group(2) + " " + matcher.group(1);
45  }
46  Range even = parseRange(fields[3]);
47  Range odd = parseRange(fields[4]);
48  return new StreetItem(fields[0], fields[1], street, even, odd);
49  }
50  return null;
51  }
StreetItem(String city, String zipcode, String street, Range< Integer > even, Range< Integer > odd)
Definition: StreetItem.java:72
Here is the call graph for this function:

The documentation for this class was generated from the following file: