Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*-
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 package com.sleepycat.je.utilint;

A stat that saves a string; a way to save general information for later display and access.
public class StringStat extends Stat<String> {
    private static final long serialVersionUID = 1L;
    private String value;
    public StringStat(StatGroup group,
                      StatDefinition definition) {
        super(groupdefinition);
    }
    public StringStat(StatGroup group,
                      StatDefinition definition,
                      String initialValue) {
        super(groupdefinition);
         = initialValue;
    }
    @Override
    public String get() {
        return ;
    }
    @Override
    public void set(String newValue) {
         = newValue;
    }
    @Override
    public void add(Stat<StringotherStat) {
         += otherStat.get();
    }
    @Override
    public void clear() {
         = null;
    }
    @Override
    protected String getFormattedValue() {
        return ;
    }
    @Override
    public boolean isNotSet() {
        return ( == null);
    }
New to GrepCode? Check out our FAQ X