ehcache

net.sf.ehcache
Class ElementIdHelper

java.lang.Object
  extended by net.sf.ehcache.ElementIdHelper

public class ElementIdHelper
extends 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
ElementIdHelper()
           
 
Method Summary
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 -

ehcache

Copyright 2001-2016, Terracotta, Inc.