Class StringIsEmptyColumnConstraint

  • All Implemented Interfaces:
    ColumnConstraint<java.lang.String>, java.lang.Comparable<ColumnConstraint<java.lang.String>>

    public class StringIsEmptyColumnConstraint
    extends java.lang.Object
    implements ColumnConstraint<java.lang.String>
    String column constraint for matching when the value is null or the empty string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.String value, TableFilterContext context)
      Compares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwise
      java.lang.Class<java.lang.String> getColumnType()
      Returns the column type that this constraint can be used to filter.
      java.lang.String getConstraintValueString()
      Returns the "value" of the constraint in string form
      ColumnConstraintEditor<java.lang.String> getEditor​(ColumnData<java.lang.String> columnDataSource)
      Returns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.
      java.lang.String getGroup()
      Returns a "group" string that is used to logically group column constraints for presentation to the user
      java.lang.String getName()
      Returns the name of the constraint
      ColumnConstraint<java.lang.String> parseConstraintValue​(java.lang.String constraintValueString, java.lang.Object dataSource)
      Parses the constraint value string for deserialization purposes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringIsEmptyColumnConstraint

        public StringIsEmptyColumnConstraint()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: ColumnConstraint
        Returns the name of the constraint
        Specified by:
        getName in interface ColumnConstraint<java.lang.String>
        Returns:
        the name of the constraint.
      • accepts

        public boolean accepts​(java.lang.String value,
                               TableFilterContext context)
        Description copied from interface: ColumnConstraint
        Compares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwise
        Specified by:
        accepts in interface ColumnConstraint<java.lang.String>
        Parameters:
        value - the column value to be tested.
        context - provides additional information about the the table and its data. This allows the filter to base its decision on information other than just the column value.
        Returns:
        true if the column value passes the constraint, false otherwise
      • getColumnType

        public java.lang.Class<java.lang.String> getColumnType()
        Description copied from interface: ColumnConstraint
        Returns the column type that this constraint can be used to filter.
        Specified by:
        getColumnType in interface ColumnConstraint<java.lang.String>
        Returns:
        the column type
      • getEditor

        public ColumnConstraintEditor<java.lang.String> getEditor​(ColumnData<java.lang.String> columnDataSource)
        Description copied from interface: ColumnConstraint
        Returns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.
        Specified by:
        getEditor in interface ColumnConstraint<java.lang.String>
        Parameters:
        columnDataSource - This provides the constraint with access to the column data in the table model as well as the DataProvider of the table (if it has one)
        Returns:
        A columnConstraintEditor for editing the constraints value.
      • getGroup

        public java.lang.String getGroup()
        Description copied from interface: ColumnConstraint
        Returns a "group" string that is used to logically group column constraints for presentation to the user
        Specified by:
        getGroup in interface ColumnConstraint<java.lang.String>
        Returns:
        the group this constraint belongs to.
      • getConstraintValueString

        public java.lang.String getConstraintValueString()
        Description copied from interface: ColumnConstraint
        Returns the "value" of the constraint in string form

        This is used for serializing the constraint.

        Specified by:
        getConstraintValueString in interface ColumnConstraint<java.lang.String>
        Returns:
        the "value" of the constraint in string form.
      • parseConstraintValue

        public ColumnConstraint<java.lang.String> parseConstraintValue​(java.lang.String constraintValueString,
                                                                       java.lang.Object dataSource)
        Description copied from interface: ColumnConstraint
        Parses the constraint value string for deserialization purposes.
        Specified by:
        parseConstraintValue in interface ColumnConstraint<java.lang.String>
        Parameters:
        constraintValueString - the value of the constraint in string form.
        dataSource - the DataSource from the Table.
        Returns:
        a new ColumnConstraint