/* * Copyright 2009 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; namespace ZXing.OneD.RSS { /// /// /// public sealed class FinderPattern { /// /// Gets the value. /// public int Value { get; private set; } /// /// Gets the start end. /// public int[] StartEnd { get; private set; } /// /// Gets the result points. /// public ResultPoint[] ResultPoints { get; private set; } /// /// Initializes a new instance of the class. /// /// The value. /// The start end. /// The start. /// The end. /// The row number. public FinderPattern(int value, int[] startEnd, int start, int end, int rowNumber) { Value = value; StartEnd = startEnd; ResultPoints = new ResultPoint[] { new ResultPoint(start, rowNumber), new ResultPoint(end, rowNumber), }; } /// /// Determines whether the specified is equal to this instance. /// /// The to compare with this instance. /// /// true if the specified is equal to this instance; otherwise, false. /// override public bool Equals(Object o) { if (!(o is FinderPattern)) { return false; } FinderPattern that = (FinderPattern)o; return Value == that.Value; } /// /// Returns a hash code for this instance. /// /// /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// override public int GetHashCode() { return Value; } } }