1. 前序遍历 1.1 前序遍历的非递归的方式 利用stack while (!stack.isEmpty()) { pop作为根节点; 根节点加入result list; 把右边节点加入到stack; 把左边节点加入到stack; } 1 public class Solution { 2 pub ...
分类:
其他好文 时间:
2016-09-22 08:46:51
阅读次数:
208
/** * 判断对象是否为空 */ public static boolean isEmpty(Object obj) { if (obj == null) return true; if (obj instanceof String) return StringUtils.isEmptyOrWhi ...
分类:
其他好文 时间:
2016-09-21 11:37:11
阅读次数:
761
/** * 判断集合是否为空 * * @param list * 集合 */ public static boolean isEmpty(List list) { if (list != null && list.size() > 0) { return false; } else { return ...
分类:
其他好文 时间:
2016-09-21 11:33:09
阅读次数:
107
java.util包. 与Set不同, List允许重复的元素。即 e1.equals(e2)。 部分方法定义 int size(); 返回列表中元素的个数,如果超过Integer.MAX_VALUE,就返回Integer.MAX_VALUE boolean isEmpty(); boolean c... ...
分类:
其他好文 时间:
2016-09-12 20:42:31
阅读次数:
219
mainActivity的业务逻辑 public void click(View v) { //[1]获取用户名 String name = et_name.getText().toString().trim(); if (TextUtils.isEmpty(name)) { Toast.makeT ...
分类:
其他好文 时间:
2016-09-10 16:09:25
阅读次数:
203
foreach(f: T => Unit) foreachPartition(f: Iterator[T] => Unit) getCheckpointFile getNumPartitions getStorageLevel isCheckpointed isEmpty() max() min() ...
分类:
其他好文 时间:
2016-09-04 17:26:45
阅读次数:
466
StringUtils.isEmpty和StringUtils.isBlank用法 ...
分类:
其他好文 时间:
2016-09-04 15:45:22
阅读次数:
194
import Foundation let str = "123" var message = "tuqiushuang , str" message+="t"//字符追加 if str.isEmpty||200>90 { print("hao") } if str==message&&100>90 ...
分类:
编程语言 时间:
2016-09-01 18:17:29
阅读次数:
143
转载:http://blog.csdn.net/fishnotears/article/details/6012953 1. public static boolean isEmpty(String str) 判断某字符串是否为空,为空的标准是str == null 或 str.length() = ...
分类:
其他好文 时间:
2016-08-26 14:57:34
阅读次数:
139
可变数组大小的List实现,允许所有的元素,包括null。(该类可粗略地看作是Vector,除了它不是同步化的) size、isEmpty、get、set、iterator和listIterator操作的运行时间是常量。add操作对于添加n个元素,需要O(n)的时间。其他的操作需要线性时间。 每个A ...
分类:
编程语言 时间:
2016-08-26 01:27:41
阅读次数:
334