新增注释

master
星期八 4 years ago
parent 2ee5a16d8c
commit 0d136a13c3
  1. 33
      panda-code/src/main/java/org/panda/code/uitl/SortUtil.java
  2. 4
      panda-code/src/main/java/org/panda/code/uitl/os/NetUtil.java
  3. 2
      panda-jdbc/src/main/java/org/panda/jdbc/annotation/Table.java

@ -98,10 +98,39 @@ public class SortUtil {
* @param arr
* @return
*/
public static int[] quickSort(int[] arr){
public static void quickSort(int[] arr){
int low = 0;
int high = arr.length-1;
return arr;
if (high-low<1){
return;
}
boolean flag = true;
int start = low;
int end = high;
int midValue = arr[low];
while (true){
if (flag){
if (arr[high]>midValue){
high--;
}else if (arr[high]<midValue){
arr[low] = arr[high];
low++;
flag = false;
}
}else {
if (arr[low]<midValue){
low++;
}else if (arr[low]>midValue){
arr[high] = arr[low];
high--;
flag = true;
}
}
if (low == high){
arr[low] = midValue;
break;
}
}
}
/**

@ -10,6 +10,10 @@ import java.net.UnknownHostException;
*/
public class NetUtil {
/**
* 获取IP
* @return
*/
public static String getIp(){
String ip = null;
try {

@ -3,8 +3,8 @@ package org.panda.jdbc.annotation;
import java.lang.annotation.*;
/**
* 数据库表注解
* @author qi
* 数据库表注解
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)

Loading…
Cancel
Save