⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arrayutilities.java

📁 WordNet is an extensive database developed by Princeton University faculty and students over the las
💻 JAVA
字号:
/*
 * ArrayUtilities
 *
 * Copyright 1998 by Oliver Steele.  You can use this software freely so long as you preserve
 * the copyright notice and this restriction, and label your changes.
 */
package edu.gwu.wordnet.util;


/**
 * Miscellaneous array functions.
 *
 * @author Oliver Steele, steele@cs.brandeis.edu
 * @version 1.0
 */
public abstract class ArrayUtilities {
	/** Return the index of the first element of <var>array</var> that is <code>equal</code>
	 * to <var>value</var>, or <code>-1</code>, if no such element exists.
	 */
	public static int indexOf(Object[] array, Object value) {
		for (int i = 0; i < array.length; ++i) {
			if (array[i].equals(value)) {
				return i;
			}
		}
		return -1;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -