public static class Call.Builder extends Object implements Serializable
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Call |
build()
Creates a Call-object from the values set in this builder.
|
Call.Builder |
callerName(String callerName)
Sets the caller name.
|
Call.Builder |
callerNumber(String callerNumber)
Sets the caller number.
|
Call.Builder |
date(Date date)
Sets the given date as call date.
|
Call.Builder |
date(String date)
Casts the string to a Date object and sets it as call date.
|
Call.Builder |
duration(int duration)
Sets the duration of the call in minutes.
|
Call.Builder |
duration(String durationString)
Parses a string of the type "HH:mm" to seconds.
|
Call.Builder |
substationName(String substationName)
Sets the substationName
|
Call.Builder |
substationNumber(String substationNumber)
Sets the sub station number.
|
Call.Builder |
type(CallType type)
Sets the type of the call.
|
Call.Builder |
type(int type)
Transforms the integer to a call type and sets it.
|
Call.Builder |
type(String type)
Casts the string to a Integer to be transformed into a CallType and
sets it.
|
public Call.Builder type(CallType type)
type
- The call type to set.public Call.Builder type(int type)
type
- The call type to set.public Call.Builder type(String type)
type
- The call type to set. (Must be able to be cast to integer)public Call.Builder date(String date) throws ParseException
date
- The date as string object of format "dd.MM.yyyy HH:mm"ParseException
- occurs if string can't be parsed.public Call.Builder date(Date date)
date
- The call date as date object.public Call.Builder callerName(String callerName)
callerName
- The caller name as string object.public Call.Builder callerNumber(String callerNumber)
callerNumber
- The caller number as string object.public Call.Builder substationName(String substationName)
substationName
- The substation name as string object.public Call.Builder substationNumber(String substationNumber)
substationNumber
- The sub station number as string object.public Call.Builder duration(String durationString) throws ParseException
durationString
- The duration in the described format.ParseException
- If the String can't be parsed.public Call.Builder duration(int duration)
duration
- The duration of the call in minutespublic Call build()
Copyright © 2018 BITPlan GmbH. All rights reserved.