Iterable<Result.Attribute>
public static class Result.Ad extends Object implements Iterable<Result.Attribute>
Constructor | Description |
---|---|
Ad() |
Modifier and Type | Method | Description |
---|---|---|
String |
campaignKey() |
Return the campaign key of this ad.
|
Result.Attribute |
getAttribute(String name) |
Get the attribute with the specified name or null if no such attribute exists for this ad.
|
TimePoint |
getEndTime() |
Get the end time or null if no such attribute exists for this ad.
|
Filter |
getIncluded() |
Get the "included" attribute or null if no such attribute exists for this ad.
|
Result.Products |
getProducts() |
|
Filter |
getRelated() |
Get the "related" attribute or null if no such attribute exists for this ad.
|
TimePoint |
getStartTime() |
Get the start time or null if no such attribute exists for this ad.
|
String |
getTicket() |
Get the notification ticket of this ad.
|
String |
getValue(String attributeName) |
Get the attribute with the specified
name from this ad or null if no such attribute exists. |
String |
getValue(String attributeName,
String defaultValue) |
Get the value of the attribute with the specified
attributeName . |
Iterator<Result.Attribute> |
iterator() |
|
String |
key() |
Return the key of this ad.
|
static Result.Ad |
mock(String key,
String ticket,
TimePoint startTime,
TimePoint endTime,
Filter included,
Filter related,
String campaignKey,
Result.Products products,
List<Result.Attribute> attributes) |
Creates a new Ad object for test purposes.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static Result.Ad mock(String key, String ticket, TimePoint startTime, TimePoint endTime, Filter included, Filter related, String campaignKey, Result.Products products, List<Result.Attribute> attributes)
key
- the ad keyticket
- the ad ticketstartTime
- the ad start timeendTime
- the ad end timeincluded
- the ad inclusion filterrelated
- the ad related filtercampaignKey
- the ad campaign keyproducts
- the products of this adattributes
- the ad attributespublic final Result.Attribute getAttribute(String name)
name
- the name of the attribute to getpublic final TimePoint getStartTime()
public final TimePoint getEndTime()
public final Filter getIncluded()
public final Filter getRelated()
public final String campaignKey()
public final String key()
public final String getValue(String attributeName)
name
from this ad or null if no such attribute exists.attributeName
- The name of the attribute whose value to retrievepublic final String getValue(String attributeName, String defaultValue)
attributeName
. The specified defaultValue
will be returned if no such attribute exists.attributeName
- The name of the attribute whose value to retrievedefaultValue
- The value to return if this ad doesn't have an attribute with the specified attributeName
public Iterator<Result.Attribute> iterator()
iterator
in interface Iterable<Result.Attribute>
public String getTicket()
public Result.Products getProducts()
Copyright © 2021 Apptus Technologies AB. All rights reserved.