File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
ddal-ddr/src/main/java/org/hellojavaer/ddal/ddr/expression/range Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public String getData() {
5252 public String toString () {
5353 StringBuilder s = new StringBuilder ();
5454 s .append ("[" ).append (this .kind .toString ());
55- if (this .kind . hasPayload () ) {
55+ if (this .data != null ) {
5656 s .append (":" ).append (this .data );
5757 }
5858 s .append ("]" );
Original file line number Diff line number Diff line change @@ -39,13 +39,10 @@ enum TokenKind {
3939
4040 TO (".." );
4141
42- final char [] tokenChars ;
43-
44- final private boolean hasPayload ; // is there more to this token than simply the kind
42+ private final String tokenString ;
4543
4644 private TokenKind (String tokenString ) {
47- this .tokenChars = tokenString .toCharArray ();
48- this .hasPayload = (this .tokenChars .length == 0 );
45+ this .tokenString = tokenString ;
4946 }
5047
5148 private TokenKind () {
@@ -54,15 +51,6 @@ private TokenKind() {
5451
5552 @ Override
5653 public String toString () {
57- return (name () + (this .tokenChars .length != 0 ? "(" + new String (this .tokenChars ) + ")" : "" ));
58- }
59-
60- public boolean hasPayload () {
61- return this .hasPayload ;
54+ return (name () + (this .tokenString .length () != 0 ? "(" + this .tokenString + ")" : "" ));
6255 }
63-
64- public int getLength () {
65- return this .tokenChars .length ;
66- }
67-
6856}
You can’t perform that action at this time.
0 commit comments