Implementing new Solution refs #13207
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-util-library@176753 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fe85439e05
commit
7756834e7c
|
@ -0,0 +1,45 @@
|
|||
package org.gcube.socialnetworking.token;
|
||||
|
||||
public class Token{
|
||||
|
||||
final String token;
|
||||
final String delimiter;
|
||||
final int start;
|
||||
final int end;
|
||||
|
||||
/**
|
||||
* @param token the Token String
|
||||
* @param delimiter the delimiter after token
|
||||
* @param start the start point in the original String
|
||||
* @param end the end point in the original String
|
||||
*/
|
||||
public Token(String token, String delimiter, int start, int end){
|
||||
this.token = token;
|
||||
this.delimiter = delimiter;
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public String getDelimiter() {
|
||||
return delimiter;
|
||||
}
|
||||
|
||||
public int getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
public int getEnd() {
|
||||
return end;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Token '%s', Subsequent delimiter '%s', Start '%d', End '%d'", token, delimiter, start, end);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue