// Attributes
// ------------------------------------------------------------------------
- private String fContext;
- private String fTypeId;
- private ITmfEventField fRootField;
+ private String fContext;
+ private String fTypeId;
+ private ITmfEventField fRootField;
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
- /**
- * Default constructor
- */
- public TmfEventType() {
- this(DEFAULT_CONTEXT_ID, DEFAULT_TYPE_ID, null);
- }
+ /**
+ * Default constructor
+ */
+ public TmfEventType() {
+ this(DEFAULT_CONTEXT_ID, DEFAULT_TYPE_ID, null);
+ }
/**
* Full constructor
* @param typeId the type name
* @param root the root field
*/
- public TmfEventType(String context, String typeId, ITmfEventField root) {
+ public TmfEventType(final String context, final String typeId, final ITmfEventField root) {
if (context == null || typeId == null)
throw new IllegalArgumentException();
fContext = context;
TmfEventTypeManager.getInstance().add(context, this);
}
- /**
- * Copy constructor
- *
- * @param type the other type
- */
- public TmfEventType(ITmfEventType type) {
- if (type == null)
- throw new IllegalArgumentException();
- fContext = type.getContext();
- fTypeId = type.getName();
- fRootField = type.getRootField();
- }
+ /**
+ * Copy constructor
+ *
+ * @param type the other type
+ */
+ public TmfEventType(final ITmfEventType type) {
+ if (type == null)
+ throw new IllegalArgumentException();
+ fContext = type.getContext();
+ fTypeId = type.getName();
+ fRootField = type.getRootField();
+ }
// ------------------------------------------------------------------------
// ITmfEventType
* @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getContext()
*/
@Override
- public String getContext() {
- return fContext;
- }
+ public String getContext() {
+ return fContext;
+ }
/* (non-Javadoc)
* @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getName()
* @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getFieldName(int)
*/
@Override
- public String getFieldName(int index) {
+ public String getFieldName(final int index) {
return (fRootField != null) ? fRootField.getFieldName(index) : null;
}
clone.fTypeId = fTypeId;
clone.fRootField = (fRootField != null) ? fRootField.clone() : null;
}
- catch (CloneNotSupportedException e) {
+ catch (final CloneNotSupportedException e) {
}
return clone;
}
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof TmfEventType))
return false;
- TmfEventType other = (TmfEventType) obj;
+ final TmfEventType other = (TmfEventType) obj;
if (!fContext.equals(other.fContext))
return false;
if (!fTypeId.equals(other.fTypeId))