Interface IIdentifiable<K>

All Known Subinterfaces:
IStringIdentifiable

public interface IIdentifiable<K>
Generic interface for data objects that can be uniquely identified by an id.

The type specified in the interface defines the type of id field.

### Example ###

 
  public class MyData implements IIdentifiable<String> {
    private String id;
    public String field1;
    public int field2;
    ...
    public String getId() {...}
    public void setId(String newId) {...}
  }
  
  
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the object id
    void
    setId(K value)
    Sets the object id
  • Method Details

    • getId

      K getId()
      Gets the object id
      Returns:
      object id
    • setId

      void setId(K value)
      Sets the object id
      Parameters:
      value - a new object id