return buf.toString();
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + (fNot ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterAndNode other = (TmfFilterAndNode) obj;
+ if (fNot != other.fNot) {
+ return false;
+ }
+ return true;
+ }
+
}
private int fResult;
private Type fType = Type.NUM;
private String fValue;
- private Number fValueNumber;
- private TmfTimestamp fValueTimestamp;
+ private transient Number fValueNumber;
+ private transient TmfTimestamp fValueTimestamp;
/**
* @param parent the parent node
clone.setValue(fValue);
return clone;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fField == null) ? 0 : fField.hashCode());
+ result = prime * result + (fNot ? 1231 : 1237);
+ result = prime * result + fResult;
+ result = prime * result + ((fType == null) ? 0 : fType.hashCode());
+ result = prime * result + ((fValue == null) ? 0 : fValue.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterCompareNode other = (TmfFilterCompareNode) obj;
+ if (fField == null) {
+ if (other.fField != null) {
+ return false;
+ }
+ } else if (!fField.equals(other.fField)) {
+ return false;
+ }
+ if (fNot != other.fNot) {
+ return false;
+ }
+ if (fResult != other.fResult) {
+ return false;
+ }
+ if (fType != other.fType) {
+ return false;
+ }
+ if (fValue == null) {
+ if (other.fValue != null) {
+ return false;
+ }
+ } else if (!fValue.equals(other.fValue)) {
+ return false;
+ }
+ return true;
+ }
}
private boolean fNot = false;
private String fField;
private String fValue;
- private String fValueUpperCase;
+ private transient String fValueUpperCase;
private boolean fIgnoreCase = false;
/**
clone.setValue(fValue);
return clone;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fField == null) ? 0 : fField.hashCode());
+ result = prime * result + (fIgnoreCase ? 1231 : 1237);
+ result = prime * result + (fNot ? 1231 : 1237);
+ result = prime * result + ((fValue == null) ? 0 : fValue.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterContainsNode other = (TmfFilterContainsNode) obj;
+ if (fField == null) {
+ if (other.fField != null) {
+ return false;
+ }
+ } else if (!fField.equals(other.fField)) {
+ return false;
+ }
+ if (fIgnoreCase != other.fIgnoreCase) {
+ return false;
+ }
+ if (fNot != other.fNot) {
+ return false;
+ }
+ if (fValue == null) {
+ if (other.fValue != null) {
+ return false;
+ }
+ } else if (!fValue.equals(other.fValue)) {
+ return false;
+ }
+ return true;
+ }
}
clone.fValue = fValue;
return clone;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fField == null) ? 0 : fField.hashCode());
+ result = prime * result + (fIgnoreCase ? 1231 : 1237);
+ result = prime * result + (fNot ? 1231 : 1237);
+ result = prime * result + ((fValue == null) ? 0 : fValue.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterEqualsNode other = (TmfFilterEqualsNode) obj;
+ if (fField == null) {
+ if (other.fField != null) {
+ return false;
+ }
+ } else if (!fField.equals(other.fField)) {
+ return false;
+ }
+ if (fIgnoreCase != other.fIgnoreCase) {
+ return false;
+ }
+ if (fNot != other.fNot) {
+ return false;
+ }
+ if (fValue == null) {
+ if (other.fValue != null) {
+ return false;
+ }
+ } else if (!fValue.equals(other.fValue)) {
+ return false;
+ }
+ return true;
+ }
}
@SuppressWarnings("javadoc")
public class TmfFilterEventTypeNode extends TmfFilterTreeNode {
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fName == null) ? 0 : fName.hashCode());
+ result = prime * result + ((fType == null) ? 0 : fType.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterEventTypeNode other = (TmfFilterEventTypeNode) obj;
+ if (fName == null) {
+ if (other.fName != null) {
+ return false;
+ }
+ } else if (!fName.equals(other.fName)) {
+ return false;
+ }
+ if (fType == null) {
+ if (other.fType != null) {
+ return false;
+ }
+ } else if (!fType.equals(other.fType)) {
+ return false;
+ }
+ return true;
+ }
+
public static final String NODE_NAME = "EVENTTYPE"; //$NON-NLS-1$
public static final String TYPE_ATTR = "type"; //$NON-NLS-1$
public static final String NAME_ATTR = "name"; //$NON-NLS-1$
private boolean fNot = false;
private String fField;
private String fRegex;
- private Pattern fPattern;
+ private transient Pattern fPattern;
/**
* @param parent
}
return ret;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fField == null) ? 0 : fField.hashCode());
+ result = prime * result + (fNot ? 1231 : 1237);
+ result = prime * result + ((fRegex == null) ? 0 : fRegex.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterMatchesNode other = (TmfFilterMatchesNode) obj;
+ if (fField == null) {
+ if (other.fField != null) {
+ return false;
+ }
+ } else if (!fField.equals(other.fField)) {
+ return false;
+ }
+ if (fNot != other.fNot) {
+ return false;
+ }
+ if (fRegex == null) {
+ if (other.fRegex != null) {
+ return false;
+ }
+ } else if (!fRegex.equals(other.fRegex)) {
+ return false;
+ }
+ return true;
+ }
}
}
return buf.toString();
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fFilterName == null) ? 0 : fFilterName.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterNode other = (TmfFilterNode) obj;
+ if (fFilterName == null) {
+ if (other.fFilterName != null) {
+ return false;
+ }
+ } else if (!fFilterName.equals(other.fFilterName)) {
+ return false;
+ }
+ return true;
+ }
}
}
return buf.toString();
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + (fNot ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterOrNode other = (TmfFilterOrNode) obj;
+ if (fNot != other.fNot) {
+ return false;
+ }
+ return true;
+ }
}
public abstract boolean matches(ITmfEvent event);
/**
- * @param event the event
- * @param field the field id
+ * @param event
+ * the event
+ * @param field
+ * the field id
* @return the field value
*/
protected Object getFieldValue(ITmfEvent event, String field) {
return null;
}
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((children == null) ? 0 : children.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TmfFilterTreeNode other = (TmfFilterTreeNode) obj;
+ if (children == null) {
+ if (other.children != null) {
+ return false;
+ }
+ } else if (!children.equals(other.children)) {
+ return false;
+ }
+ return true;
+ }
}