Tweak naming
This commit is contained in:
parent
78b815cc71
commit
6fcb04070b
@ -34,36 +34,36 @@ public abstract class TypeCombined<T> extends TypeAbstract<T>
|
|||||||
this.buildSeparatorsPattern();
|
this.buildSeparatorsPattern();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String separatorTypeName = " ";
|
private String typeNameSeparator = " ";
|
||||||
public String getSeparatorTypeName() { return this.separatorTypeName; }
|
public String getTypeNameSeparator() { return this.typeNameSeparator; }
|
||||||
public void setSeparatorTypeName(String separatorTypeName) { this.separatorTypeName = separatorTypeName; }
|
public void setTypeNameSeparator(String typeNameSeparator) { this.typeNameSeparator = typeNameSeparator; }
|
||||||
|
|
||||||
// Visual
|
// Visual
|
||||||
private boolean includeNullVisual = true;
|
private boolean visualNullIncluded = true;
|
||||||
public boolean doesIncludeNullVisual() { return this.includeNullVisual; }
|
public boolean isVisualNullIncluded() { return this.visualNullIncluded; }
|
||||||
public void setIncludeNullVisual(boolean includeNullVisual) { this.includeNullVisual = includeNullVisual; }
|
public void setVisualNullIncluded(boolean visualNullIncluded) { this.visualNullIncluded = visualNullIncluded; }
|
||||||
|
|
||||||
private String separatorVisual = " ";
|
private String visualSeparator = " ";
|
||||||
public String getSeparatorVisual() { return this.separatorVisual; }
|
public String getVisualSeparator() { return this.visualSeparator; }
|
||||||
public void setSeparatorVisual(String separatorVisual) { this.separatorVisual = separatorVisual; }
|
public void setVisualSeparator(String visualSeparator) { this.visualSeparator = visualSeparator; }
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
private boolean includeNullName = true;
|
private boolean nameNullIncluded = true;
|
||||||
public boolean doesIncludeNullName() { return this.includeNullName; }
|
public boolean isNameNullIncluded() { return this.nameNullIncluded; }
|
||||||
public void setIncludeNullName(boolean includeNullName) { this.includeNullName = includeNullName; }
|
public void setNameNullIncluded(boolean nameNullIncluded) { this.nameNullIncluded = nameNullIncluded; }
|
||||||
|
|
||||||
private String separatorName = " ";
|
private String nameSeparator = " ";
|
||||||
public String getSeparatorName() { return this.separatorName; }
|
public String getNameSeparator() { return this.nameSeparator; }
|
||||||
public void setSeparatorName(String separatorName) { this.separatorName = separatorName; }
|
public void setNameSeparator(String nameSeparator) { this.nameSeparator = nameSeparator; }
|
||||||
|
|
||||||
// Id
|
// Id
|
||||||
private boolean includeNullId = true;
|
private boolean idNullIncluded = true;
|
||||||
public boolean doesIncludeNullId() { return this.includeNullId; }
|
public boolean isIdNullIncluded() { return this.idNullIncluded; }
|
||||||
public void setIncludeNullId(boolean includeNullId) { this.includeNullId = includeNullId; }
|
public void setIdNullIncluded(boolean idNullIncluded) { this.idNullIncluded = idNullIncluded; }
|
||||||
|
|
||||||
private String separatorId = " ";
|
private String idSeparator = " ";
|
||||||
public String getSeparatorId() { return this.separatorId; }
|
public String getIdSeparator() { return this.idSeparator; }
|
||||||
public void setSeparatorId(String separatorId) { this.separatorId = separatorId; }
|
public void setIdSeparator(String idSeparator) { this.idSeparator = idSeparator; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
@ -124,7 +124,7 @@ public abstract class TypeCombined<T> extends TypeAbstract<T>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return Txt.implode(parts, this.getSeparatorTypeName());
|
return Txt.implode(parts, this.getTypeNameSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -143,12 +143,12 @@ public abstract class TypeCombined<T> extends TypeAbstract<T>
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Type<Object> type = (Type<Object>) entry.getKey();
|
Type<Object> type = (Type<Object>) entry.getKey();
|
||||||
String part = type.getVisual(entry.getValue(), sender);
|
String part = type.getVisual(entry.getValue(), sender);
|
||||||
if ( ! this.doesIncludeNullVisual() && part == null) continue;
|
if ( ! this.isVisualNullIncluded() && part == null) continue;
|
||||||
parts.add(part);
|
parts.add(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return Txt.implode(parts, this.getSeparatorVisual());
|
return Txt.implode(parts, this.getVisualSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -167,12 +167,12 @@ public abstract class TypeCombined<T> extends TypeAbstract<T>
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Type<Object> type = (Type<Object>) entry.getKey();
|
Type<Object> type = (Type<Object>) entry.getKey();
|
||||||
String part = type.getName(entry.getValue());
|
String part = type.getName(entry.getValue());
|
||||||
if ( ! this.doesIncludeNullName() && part == null) continue;
|
if ( ! this.isNameNullIncluded() && part == null) continue;
|
||||||
parts.add(part);
|
parts.add(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return Txt.implode(parts, this.getSeparatorName());
|
return Txt.implode(parts, this.getNameSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -191,12 +191,12 @@ public abstract class TypeCombined<T> extends TypeAbstract<T>
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Type<Object> type = (Type<Object>) entry.getKey();
|
Type<Object> type = (Type<Object>) entry.getKey();
|
||||||
String part = type.getId(entry.getValue());
|
String part = type.getId(entry.getValue());
|
||||||
if ( ! this.doesIncludeNullId() && part == null) continue;
|
if ( ! this.isIdNullIncluded() && part == null) continue;
|
||||||
parts.add(part);
|
parts.add(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return Txt.implode(parts, this.getSeparatorId());
|
return Txt.implode(parts, this.getIdSeparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -24,7 +24,7 @@ public class TypeEntry<K, V> extends TypeCombined<Entry<K, V>>
|
|||||||
public TypeEntry(Type<K> keyType, Type<V> valueType)
|
public TypeEntry(Type<K> keyType, Type<V> valueType)
|
||||||
{
|
{
|
||||||
super(keyType, valueType);
|
super(keyType, valueType);
|
||||||
this.setSeparatorTypeName(" and ");
|
this.setTypeNameSeparator(" and ");
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user