BrightSide Workbench Full Report + Source Code
org.turro.contacts.ValueIt Class Reference
Inheritance diagram for org.turro.contacts.ValueIt:
Collaboration diagram for org.turro.contacts.ValueIt:

Public Member Functions

String getId ()
 
void setId (String id)
 
String getValue ()
 
void setValue (String value)
 
FieldIt getFieldIt ()
 
void setFieldIt (FieldIt fieldIt)
 
String getPath ()
 
void setPath (String path)
 
boolean isValid ()
 
void setObjectValue (Object obj)
 
Object getObjectValue ()
 
String getObjectString ()
 
String getObjectString (boolean label)
 
String getLabeledObjectString ()
 

Detailed Description

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

Definition at line 42 of file ValueIt.java.

Member Function Documentation

◆ getFieldIt()

FieldIt org.turro.contacts.ValueIt.getFieldIt ( )

Definition at line 74 of file ValueIt.java.

74  {
75  return fieldIt;
76  }
Here is the caller graph for this function:

◆ getId()

String org.turro.contacts.ValueIt.getId ( )

Definition at line 58 of file ValueIt.java.

58  {
59  return id;
60  }
Here is the caller graph for this function:

◆ getLabeledObjectString()

String org.turro.contacts.ValueIt.getLabeledObjectString ( )

Definition at line 136 of file ValueIt.java.

136  {
137  Object obj = getObjectValue();
138  if(obj instanceof Boolean) {
139  return ((Boolean) obj) ? I_.get(fieldIt.getName()) : "";
140  } else if(obj instanceof Number) {
141  return I_.get(fieldIt.getName()) + ": " + DecimalFormats.format((Number) obj);
142  } else if(obj instanceof Date) {
143  return I_.get(fieldIt.getName()) + ": " + DateFormats.format((Date) obj, true);
144  } else if(obj instanceof String) {
145  return I_.get(fieldIt.getName()) + ": " + (String) obj;
146  } else if(obj instanceof StringList) {
147  return I_.get(fieldIt.getName()) + ": " + ((StringList) obj).getValue();
148  }
149  return obj == null ? "" : I_.get(fieldIt.getName()) + ": " + obj.toString();
150  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObjectString() [1/2]

String org.turro.contacts.ValueIt.getObjectString ( )

Definition at line 112 of file ValueIt.java.

112  {
113  return getObjectString(true);
114  }

◆ getObjectString() [2/2]

String org.turro.contacts.ValueIt.getObjectString ( boolean  label)

Definition at line 116 of file ValueIt.java.

116  {
117  Object obj = getObjectValue();
118  if(obj instanceof Boolean) {
119  if(label) {
120  return BooleanFormats.format((Boolean) obj);
121  } else {
122  return ((Boolean) obj) ? I_.get(fieldIt.getName()) : "";
123  }
124  } else if(obj instanceof Number) {
125  return DecimalFormats.format((Number) obj);
126  } else if(obj instanceof Date) {
127  return DateFormats.format((Date) obj, true);
128  } else if(obj instanceof String) {
129  return (String) obj;
130  } else if(obj instanceof StringList) {
131  return ((StringList) obj).getValue();
132  }
133  return obj == null ? "" : obj.toString();
134  }
Here is the call graph for this function:

◆ getObjectValue()

Object org.turro.contacts.ValueIt.getObjectValue ( )

Definition at line 104 of file ValueIt.java.

104  {
105  if(Reflections.of(fieldIt.getJavaClass()).canCast(StringList.class)) {
106  return value;
107  } else {
108  return ObjectString.parseNativeString(value, fieldIt.getJavaClass(), false);
109  }
110  }
Here is the caller graph for this function:

◆ getPath()

String org.turro.contacts.ValueIt.getPath ( )

Definition at line 82 of file ValueIt.java.

82  {
83  return path;
84  }
Here is the caller graph for this function:

◆ getValue()

String org.turro.contacts.ValueIt.getValue ( )

Definition at line 66 of file ValueIt.java.

66  {
67  return value;
68  }
Here is the caller graph for this function:

◆ isValid()

boolean org.turro.contacts.ValueIt.isValid ( )

Definition at line 92 of file ValueIt.java.

92  {
93  return fieldIt != null && !Strings.isBlank(value);
94  }

◆ setFieldIt()

void org.turro.contacts.ValueIt.setFieldIt ( FieldIt  fieldIt)

Definition at line 78 of file ValueIt.java.

78  {
79  this.fieldIt = fieldIt;
80  }
Here is the caller graph for this function:

◆ setId()

void org.turro.contacts.ValueIt.setId ( String  id)

Definition at line 62 of file ValueIt.java.

62  {
63  this.id = id;
64  }

◆ setObjectValue()

void org.turro.contacts.ValueIt.setObjectValue ( Object  obj)

Definition at line 96 of file ValueIt.java.

96  {
97  if(obj instanceof StringList) {
98  value = ((StringList) obj).getValue();
99  } else {
100  value = ObjectString.formatNativeObject(obj, false);
101  }
102  }

◆ setPath()

void org.turro.contacts.ValueIt.setPath ( String  path)

Definition at line 86 of file ValueIt.java.

86  {
87  this.path = path;
88  }

◆ setValue()

void org.turro.contacts.ValueIt.setValue ( String  value)

Definition at line 70 of file ValueIt.java.

70  {
71  this.value = value;
72  }

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