BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.context.AttributeSupport Class Reference
Inheritance diagram for org.turro.elephant.impl.context.AttributeSupport:
Collaboration diagram for org.turro.elephant.impl.context.AttributeSupport:

Public Member Functions

 AttributeSupport ()
 
void addAttribute (AttributeItem attr)
 
AttributeItem get (String name)
 
AttributeItem getAttribute (String name)
 
String getAttributeValue (String name, String defaultValue)
 
int getAttributeIntegerValue (String name, int defaultValue)
 
double getAttributeDoubleValue (String name, double defaultValue)
 
boolean getAttributeBooleanValue (String name, boolean defaultValue)
 
Date getAttributeDateValue (String name, Date defaultValue)
 
List< String > getAttributeListValue (String name, String defaultValue)
 

Detailed Description

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

Definition at line 27 of file AttributeSupport.java.

Constructor & Destructor Documentation

◆ AttributeSupport()

org.turro.elephant.impl.context.AttributeSupport.AttributeSupport ( )

Creates a new instance of AttributeSupport

Definition at line 30 of file AttributeSupport.java.

30  {
31  }

Member Function Documentation

◆ addAttribute()

void org.turro.elephant.impl.context.AttributeSupport.addAttribute ( AttributeItem  attr)

Definition at line 33 of file AttributeSupport.java.

33  {
34  put(attr.name, attr);
35  }
Here is the caller graph for this function:

◆ get()

AttributeItem org.turro.elephant.impl.context.AttributeSupport.get ( String  name)

Definition at line 37 of file AttributeSupport.java.

37  {
38  return (AttributeItem) super.get(name);
39  }

◆ getAttribute()

AttributeItem org.turro.elephant.impl.context.AttributeSupport.getAttribute ( String  name)

Definition at line 41 of file AttributeSupport.java.

41  {
42  return (AttributeItem) get(name);
43  }
Here is the caller graph for this function:

◆ getAttributeBooleanValue()

boolean org.turro.elephant.impl.context.AttributeSupport.getAttributeBooleanValue ( String  name,
boolean  defaultValue 
)

Definition at line 73 of file AttributeSupport.java.

73  {
74  AttributeItem ai = (AttributeItem) get(name);
75  if(ai != null) {
76  return ai.getBooleanValue(defaultValue);
77  }
78  return defaultValue;
79  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttributeDateValue()

Date org.turro.elephant.impl.context.AttributeSupport.getAttributeDateValue ( String  name,
Date  defaultValue 
)

Definition at line 81 of file AttributeSupport.java.

81  {
82  AttributeItem ai = (AttributeItem) get(name);
83  if(ai != null) {
84  return ai.getDateValue(defaultValue);
85  }
86  return defaultValue;
87  }
Here is the call graph for this function:

◆ getAttributeDoubleValue()

double org.turro.elephant.impl.context.AttributeSupport.getAttributeDoubleValue ( String  name,
double  defaultValue 
)

Definition at line 65 of file AttributeSupport.java.

65  {
66  AttributeItem ai = (AttributeItem) get(name);
67  if(ai != null) {
68  return ai.getDoubleValue(defaultValue);
69  }
70  return defaultValue;
71  }
Here is the call graph for this function:

◆ getAttributeIntegerValue()

int org.turro.elephant.impl.context.AttributeSupport.getAttributeIntegerValue ( String  name,
int  defaultValue 
)

Definition at line 57 of file AttributeSupport.java.

57  {
58  AttributeItem ai = (AttributeItem) get(name);
59  if(ai != null) {
60  return ai.getIntegerValue(defaultValue);
61  }
62  return defaultValue;
63  }
Here is the call graph for this function:

◆ getAttributeListValue()

List<String> org.turro.elephant.impl.context.AttributeSupport.getAttributeListValue ( String  name,
String  defaultValue 
)

Definition at line 89 of file AttributeSupport.java.

89  {
90  String value = getAttributeValue(name, defaultValue);
91  if(!Strings.isBlank(value)) {
92  return Arrays.asList(value.split(","));
93  }
94  return null;
95  }
String getAttributeValue(String name, String defaultValue)
Here is the call graph for this function:

◆ getAttributeValue()

String org.turro.elephant.impl.context.AttributeSupport.getAttributeValue ( String  name,
String  defaultValue 
)

Definition at line 45 of file AttributeSupport.java.

45  {
46  AttributeItem ai = (AttributeItem) get(name);
47  String value = null;
48  if(ai != null) {
49  value = ai.getValue();
50  }
51  if(value == null) {
52  return defaultValue;
53  }
54  return value;
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

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