public boolean equals(Object obj) {if (this == obj) return true;if (obj instanceof SegmentInfo) {final SegmentInfo other = (SegmentInfo) obj;return other.dir == dir && other.name.equals(name);} else {return false;}}
public override bool Equals(object obj){if (this == obj){return true;}if (obj is SegmentInfo){SegmentInfo other = (SegmentInfo)obj;return other.Dir == Dir && other.Name.Equals(Name, StringComparison.Ordinal);}else{return false;}}