package org.ehcache.xml.model;

import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;


Java class for memory-type complex type.

The following schema fragment specifies the expected content contained within this class.

<complexType name="memory-type">
  <simpleContent>
    <extension base="<http://www.w3.org/2001/XMLSchema>positiveInteger">
      <attribute name="unit" type="{http://www.ehcache.org/v3}memory-unit" default="B" />
    </extension>
  </simpleContent>
</complexType>
/** * <p>Java class for memory-type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="memory-type"&gt; * &lt;simpleContent&gt; * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;positiveInteger"&gt; * &lt;attribute name="unit" type="{http://www.ehcache.org/v3}memory-unit" default="B" /&gt; * &lt;/extension&gt; * &lt;/simpleContent&gt; * &lt;/complexType&gt; * </pre> * * */
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "memory-type", propOrder = { "value" }) @XmlSeeAlso({ PersistableMemoryType.class }) public class MemoryType { @XmlValue @XmlSchemaType(name = "positiveInteger") protected BigInteger value; @XmlAttribute(name = "unit") protected MemoryUnit unit;
Gets the value of the value property.
Returns: possible object is BigInteger
/** * Gets the value of the value property. * * @return * possible object is * {@link BigInteger } * */
public BigInteger getValue() { return value; }
Sets the value of the value property.
Params:
/** * Sets the value of the value property. * * @param value * allowed object is * {@link BigInteger } * */
public void setValue(BigInteger value) { this.value = value; }
Gets the value of the unit property.
Returns: possible object is MemoryUnit
/** * Gets the value of the unit property. * * @return * possible object is * {@link MemoryUnit } * */
public MemoryUnit getUnit() { if (unit == null) { return MemoryUnit.B; } else { return unit; } }
Sets the value of the unit property.
Params:
/** * Sets the value of the unit property. * * @param value * allowed object is * {@link MemoryUnit } * */
public void setUnit(MemoryUnit value) { this.unit = value; } public MemoryType withValue(BigInteger value) { setValue(value); return this; } public MemoryType withUnit(MemoryUnit value) { setUnit(value); return this; } }