Changed the name of FileFinder to FileUtil
This commit is contained in:
parent
a9bc9997ca
commit
ce83415d1c
19 changed files with 315 additions and 59 deletions
|
|
@ -18,6 +18,7 @@ public class BBCodeParser {
|
|||
System.out.println(parser.parse("jshdkj [m"));
|
||||
System.out.println(parser.parse("jshdkj [/m"));
|
||||
System.out.println(parser.parse("jshdkj m]"));
|
||||
System.out.println(parser.parse("jshdkj <br />"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -81,7 +82,7 @@ public class BBCodeParser {
|
|||
if(c == '['){
|
||||
bbcode = new StringBuilder();
|
||||
}
|
||||
else if(c == '/'){
|
||||
else if(bbcode!=null && c == '/'){
|
||||
closeTag = true;
|
||||
}
|
||||
else if(bbcode!=null){
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public class JSONNode implements Iterable<JSONNode>{
|
|||
* Sets the value of the node, but only if it is setup as an JSONType.Value
|
||||
*/
|
||||
public void set(int value){
|
||||
if( !this.isValue() ) return;
|
||||
if( !this.isValue() ) throw new NullPointerException("The node is not setup as a value");
|
||||
type = JSONType.Number;
|
||||
this.value = ""+value;
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ public class JSONNode implements Iterable<JSONNode>{
|
|||
* Sets the value of the node, but only if it is setup as an JSONType.Value
|
||||
*/
|
||||
public void set(double value){
|
||||
if( !this.isValue() ) return;
|
||||
if( !this.isValue() ) throw new NullPointerException("The node is not setup as a value");
|
||||
type = JSONType.Number;
|
||||
this.value = ""+value;
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ public class JSONNode implements Iterable<JSONNode>{
|
|||
* Sets the value of the node, but only if it is setup as an JSONType.Value
|
||||
*/
|
||||
public void set(boolean value){
|
||||
if( !this.isValue() ) return;
|
||||
if( !this.isValue() ) throw new NullPointerException("The node is not setup as a value");
|
||||
type = JSONType.Boolean;
|
||||
this.value = ""+value;
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ public class JSONNode implements Iterable<JSONNode>{
|
|||
* Sets the value of the node, but only if it is setup as an JSONType.Value
|
||||
*/
|
||||
public void set(String value){
|
||||
if( !this.isValue() ) return;
|
||||
if( !this.isValue() ) throw new NullPointerException("The node is not setup as a value");
|
||||
type = JSONType.String;
|
||||
this.value = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package zutil.parser.json;
|
|||
import zutil.MultiPrintStream;
|
||||
import zutil.parser.json.JSONNode.JSONType;
|
||||
|
||||
public class JSONParser {
|
||||
public class JSONParser{
|
||||
private String json;
|
||||
private int index;
|
||||
|
||||
|
|
@ -159,4 +159,6 @@ public class JSONParser {
|
|||
System.out.println("Return");
|
||||
return root;
|
||||
}
|
||||
|
||||
public void close() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package zutil.parser.json;
|
|||
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Iterator;
|
||||
|
||||
import zutil.parser.json.JSONNode.JSONType;
|
||||
|
|
@ -12,7 +11,7 @@ import zutil.parser.json.JSONNode.JSONType;
|
|||
*
|
||||
* @author Ziver
|
||||
*/
|
||||
public class JSONWriter {
|
||||
public class JSONWriter{
|
||||
private PrintStream out;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue