org.usergrid.persistence
Enum CounterResolution

java.lang.Object
  extended by java.lang.Enum<CounterResolution>
      extended by org.usergrid.persistence.CounterResolution
All Implemented Interfaces:
Serializable, Comparable<CounterResolution>

public enum CounterResolution
extends Enum<CounterResolution>


Enum Constant Summary
ALL
           
DAY
           
FIVE_MINUTES
           
HALF_DAY
           
HALF_HOUR
           
HOUR
           
MINUTE
           
MONTH
           
SIX_HOUR
           
WEEK
           
 
Method Summary
static CounterResolution fromMinutes(int m)
           
static CounterResolution fromOrdinal(int i)
           
static CounterResolution fromString(String s)
           
 long interval()
           
 long next(long timestamp)
           
 long round(long timestamp)
           
static CounterResolution valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CounterResolution[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALL

public static final CounterResolution ALL

MINUTE

public static final CounterResolution MINUTE

FIVE_MINUTES

public static final CounterResolution FIVE_MINUTES

HALF_HOUR

public static final CounterResolution HALF_HOUR

HOUR

public static final CounterResolution HOUR

SIX_HOUR

public static final CounterResolution SIX_HOUR

HALF_DAY

public static final CounterResolution HALF_DAY

DAY

public static final CounterResolution DAY

WEEK

public static final CounterResolution WEEK

MONTH

public static final CounterResolution MONTH
Method Detail

values

public static CounterResolution[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CounterResolution c : CounterResolution.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CounterResolution valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

interval

public long interval()

round

public long round(long timestamp)

next

public long next(long timestamp)

fromOrdinal

public static CounterResolution fromOrdinal(int i)

fromMinutes

public static CounterResolution fromMinutes(int m)

fromString

public static CounterResolution fromString(String s)


Copyright © 2013. All Rights Reserved.