Class ElementIdHelper


  • public class ElementIdHelper
    extends java.lang.Object
    Provide access to the package private methods for getting/setting Element id. The id field of an Element is for internal ehcache use only and this class is meant to discourage casual use of the methods from application code
    Author:
    teck
    • Constructor Summary

      Constructors 
      Constructor Description
      ElementIdHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getId​(Element e)
      Get the element id
      static boolean hasId​(Element e)
      Is element id set?
      static void setId​(Element e, long id)
      Set the element id
      • Methods inherited from class java.lang.Object

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

      • ElementIdHelper

        public ElementIdHelper()
    • Method Detail

      • hasId

        public static boolean hasId​(Element e)
        Is element id set?
        Parameters:
        e - element to inspect
        Returns:
        true if this element has an id set
      • getId

        public static long getId​(Element e)
        Get the element id
        Parameters:
        e - element to inspect
        Returns:
        element id
      • setId

        public static void setId​(Element e,
                                 long id)
        Set the element id
        Parameters:
        e - element to adjust
        id -