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.XmlType;
import javax.xml.bind.annotation.XmlValue;
Java class for time-type complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="time-type">
<simpleContent>
<extension base="<http://www.w3.org/2001/XMLSchema>positiveInteger">
<attribute name="unit" type="{http://www.ehcache.org/v3}time-unit" default="seconds" />
</extension>
</simpleContent>
</complexType>
/**
* <p>Java class for time-type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="time-type">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>positiveInteger">
* <attribute name="unit" type="{http://www.ehcache.org/v3}time-unit" default="seconds" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "time-type", propOrder = {
"value"
})
public class TimeType {
@XmlValue
@XmlSchemaType(name = "positiveInteger")
protected BigInteger value;
@XmlAttribute(name = "unit")
protected TimeUnit 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: - value – allowed object is
BigInteger
/**
* 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 TimeUnit
/**
* Gets the value of the unit property.
*
* @return
* possible object is
* {@link TimeUnit }
*
*/
public TimeUnit getUnit() {
if (unit == null) {
return TimeUnit.SECONDS;
} else {
return unit;
}
}
Sets the value of the unit property.
Params: - value – allowed object is
TimeUnit
/**
* Sets the value of the unit property.
*
* @param value
* allowed object is
* {@link TimeUnit }
*
*/
public void setUnit(TimeUnit value) {
this.unit = value;
}
public TimeType withValue(BigInteger value) {
setValue(value);
return this;
}
public TimeType withUnit(TimeUnit value) {
setUnit(value);
return this;
}
}