-
-
package zad1_2;
-
-
import java.util.*;
-
-
import bounded_type_p.Box;
-
-
public class Zad1_2 {
-
ArrayList<String> list = new ArrayList<String>();
-
-
-
public static final StringConstraint FIRST_NAME_CONSTRAINT =
-
new StringConstraint("firstName", false, 30);
-
-
-
public static final StringConstraint LAST_NAME_CONSTRAINT =
-
new StringConstraint("lastName", false, 30);
-
-
public static final StringConstraint PHONE_CONSTRAINT =
-
new StringConstraint("phone", false, 20);
-
-
String firstName;
-
String lastName;
-
String phone;
-
-
public void setFirstName(final String firstName) {
-
FIRST_NAME_CONSTRAINT.validate(firstName);
-
final String oldFirstName = this.firstName;
-
this.firstName = firstName;
-
propertyChangeSupport.firePropertyChange("firstName", oldFirstName, this.firstName);
-
}
-
-
public String getFirstName() {
-
return this.firstName;
-
}
-
-
public void setLastName(final String lastName) {
-
LAST_NAME_CONSTRAINT.validate(lastName);
-
final String oldLastName = this.lastName;
-
this.lastName = lastName;
-
propertyChangeSupport.firePropertyChange("lastName", oldLastName, this.lastName);
-
}
-
-
-
public String getLastName() {
-
return this.lastName;
-
}
-
-
-
-
public void setPhone(final String phone) {
-
PHONE_CONSTRAINT.validate(phone);
-
final String oldPhone = this.phone;
-
this.phone = phone;
-
propertyChangeSupport.firePropertyChange("phone", oldPhone, this.phone);
-
}
-
-
public String getPhone() {
-
return this.phone;
-
}
-
-
-
public static void main(String[] args) {
-
-
}
-
-
}
-
why it highlihgts StringConstraint as an error
1 1443 -
-
package zad1_2;
-
-
import java.util.*;
-
-
import bounded_type_p.Box;
-
-
public class Zad1_2 {
-
ArrayList<String> list = new ArrayList<String>();
-
-
-
public static final StringConstraint FIRST_NAME_CONSTRAINT =
-
new StringConstraint("firstName", false, 30);
-
-
-
public static final StringConstraint LAST_NAME_CONSTRAINT =
-
new StringConstraint("lastName", false, 30);
-
-
public static final StringConstraint PHONE_CONSTRAINT =
-
new StringConstraint("phone", false, 20);
-
-
String firstName;
-
String lastName;
-
String phone;
-
-
public void setFirstName(final String firstName) {
-
FIRST_NAME_CONSTRAINT.validate(firstName);
-
final String oldFirstName = this.firstName;
-
this.firstName = firstName;
-
propertyChangeSupport.firePropertyChange("firstName", oldFirstName, this.firstName);
-
}
-
-
public String getFirstName() {
-
return this.firstName;
-
}
-
-
public void setLastName(final String lastName) {
-
LAST_NAME_CONSTRAINT.validate(lastName);
-
final String oldLastName = this.lastName;
-
this.lastName = lastName;
-
propertyChangeSupport.firePropertyChange("lastName", oldLastName, this.lastName);
-
}
-
-
-
public String getLastName() {
-
return this.lastName;
-
}
-
-
-
-
public void setPhone(final String phone) {
-
PHONE_CONSTRAINT.validate(phone);
-
final String oldPhone = this.phone;
-
this.phone = phone;
-
propertyChangeSupport.firePropertyChange("phone", oldPhone, this.phone);
-
}
-
-
public String getPhone() {
-
return this.phone;
-
}
-
-
-
public static void main(String[] args) {
-
-
}
-
-
}
-
why it highlihgts StringConstraint as an error
Where did you get the StringConstraint class from? It does not appear to be part of the standard java API.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: oll3i |
last post by:
how to constrain a string to 30 chars?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |