Class ReferenceString

java.lang.Object
com.iizix.prop.ReferenceString
All Implemented Interfaces:
Cloneable

public class ReferenceString extends Object implements Cloneable
The reference string object that also can contain a custom reference object.
Author:
Christopher Mindus
  • Constructor Details Link icon

    • ReferenceString Link icon

      public ReferenceString(String s)
      Creates the String object.
  • Method Details Link icon

    • setObject Link icon

      public void setObject(Object o)
      Sets the Reference Object.
      Parameters:
      o - Any object or null for none.
    • getObject Link icon

      public Object getObject()
      Gets the Reference Object.
      Returns:
      The object set by setObject(Object).
    • clone Link icon

      public ReferenceString clone()
      Clones the reference string.
      Overrides:
      clone in class Object
      Returns:
      A cloned ReferenceString instance, with the SAME object reference as set by setObject(Object).
    • equalsOnlyReferenceString Link icon

      public boolean equalsOnlyReferenceString(ReferenceString rs)
      Checks if two reference strings are equal (excluding their object). This method is used to check comparisons when saving a file.
      Parameters:
      rs - The other reference string to compare with.
      Returns:
      true for equals, false otherwise.
    • equals Link icon

      public boolean equals(Object o)
      Checks if two reference strings are equal (including their object). This is required in order for the reference property to fire notification events.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare with.
      Returns:
      true for equals, false otherwise.
    • toString Link icon

      public String toString()
      Converts to a String.
      Overrides:
      toString in class Object
      Returns:
      The string reference.