TestRow
The snippet can be accessed without any authentication.
Authored by
Aleksander Johansen
Test.java 1.28 KiB
package app.sample.controllers;
import javafx.beans.property.SimpleStringProperty;
import java.util.Random;
public class Test{
private Random gen = new Random();
private final SimpleStringProperty test;
private final SimpleStringProperty data;
private final SimpleStringProperty type;
public Test(){
this.test = new SimpleStringProperty(randomEmail());
this.data = new SimpleStringProperty(randomText());
this.type = new SimpleStringProperty(randomText());
}
public String getTest(){
return test.get();
}
public void setTest(String test){
this.test.set(test);
}
public String getData(){
return data.get();
}
public void setData(String data){
this.data.set(data);
}
public String getType(){
return type.get();
}
public void setType(String type){
this.type.set(type);
}
private String randomText(){
String res = "";
for(int i = 0; i < 20; i++){
res += (char)(gen.nextInt(26) + 65);
}
return res;
}
private String randomEmail(){
String res = "";
for(int i = 0; i < 20; i++){
res += (char)(gen.nextInt(26) + 65);
}
return res + "@hotmail.com";
}
}
Please register or sign in to comment