001 /*
002 * Java Genetic Algorithm Library (jenetics-1.6.0).
003 * Copyright (c) 2007-2014 Franz Wilhelmstötter
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 *
017 * Author:
018 * Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
019 */
020 package org.jenetics.internal.util;
021
022 import org.jenetics.util.Seq;
023
024 /**
025 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
026 * @version 1.6 — <em>$Date: 2014-03-03 $</em>
027 * @since 1.6
028 */
029 public interface Hash {
030
031 public abstract Hash and(final boolean value);
032
033 /**
034 * Add hash code for an {@code boolean} array.
035 *
036 * @param values the value to add to the hash code.
037 * @return {@code this}
038 */
039 public abstract Hash and(final boolean[] values);
040
041 /**
042 * Add hash code for a {@code byte}.
043 *
044 * @param value the value to add to the hash code.
045 * @return {@code this}
046 */
047 public abstract Hash and(final byte value);
048
049 /**
050 * Add hash code for an {@code byte} arrays.
051 *
052 * @param values the value to add to the hash code.
053 * @return {@code this}
054 */
055 public abstract Hash and(final byte[] values);
056
057 /**
058 * Add hash code for a {@code char}.
059 *
060 * @param value the value to add to the hash code.
061 * @return {@code this}
062 */
063 public abstract Hash and(final char value);
064
065 /**
066 * Add hash code for an {@code char} array.
067 *
068 * @param values the value to add to the hash code.
069 * @return {@code this}
070 */
071 public abstract Hash and(final char[] values);
072
073 /**
074 * Add hash code for a {@code short}.
075 *
076 * @param value the value to add to the hash code.
077 * @return {@code this}
078 */
079 public abstract Hash and(final short value);
080
081 /**
082 * Add hash code for an {@code short} array.
083 *
084 * @param values the value to add to the hash code.
085 * @return {@code this}
086 */
087 public abstract Hash and(final short[] values);
088
089 /**
090 * Add hash code for an {@code int}.
091 *
092 * @param value the value to add to the hash code.
093 * @return {@code this}
094 */
095 public abstract Hash and(final int value);
096
097 /**
098 * Add hash code for an {@code int} array.
099 *
100 * @param values the value to add to the hash code.
101 * @return {@code this}
102 */
103 public abstract Hash and(final int[] values);
104
105 /**
106 * Add hash code for a {@code long}.
107 *
108 * @param value the value to add to the hash code.
109 * @return {@code this}
110 */
111 public abstract Hash and(final long value);
112
113 /**
114 * Add hash code for an {@code long} array.
115 *
116 * @param values the value to add to the hash code.
117 * @return {@code this}
118 */
119 public abstract Hash and(final long[] values);
120
121 /**
122 * Add hash code for a {@code float}.
123 *
124 * @param value the value to add to the hash code.
125 * @return {@code this}
126 */
127 public abstract Hash and(final float value);
128
129 /**
130 * Add hash code for an {@code float} array.
131 *
132 * @param values the value to add to the hash code.
133 * @return {@code this}
134 */
135 public abstract Hash and(final float[] values);
136
137 /**
138 * Add hash code for a {@code double}.
139 *
140 * @param value the value to add to the hash code.
141 * @return {@code this}
142 */
143 public abstract Hash and(final double value);
144
145 /**
146 * Add hash code for an {@code double} array.
147 *
148 * @param values the value to add to the hash code.
149 * @return {@code this}
150 */
151 public abstract Hash and(final double[] values);
152
153 /**
154 * Add hash code for a {@code Object}.
155 *
156 * @param value the value to add to the hash code.
157 * @return {@code this}
158 */
159 public abstract Hash and(final Object value);
160
161 /**
162 * Add hash code for an {@code Object}.
163 *
164 * @param values the value to add to the hash code.
165 * @return {@code this}
166 */
167 public abstract Hash and(final Object[] values);
168
169 /**
170 * Add hash code for a {@code Seq}.
171 *
172 * @param values the value to add to the hash code.
173 * @return {@code this}
174 */
175 public abstract Hash and(final Seq<?> values);
176
177 /**
178 * Return the calculated hash value.
179 *
180 * @return the calculated hash value.
181 */
182 public int value();
183 }
|