com.helger.holiday.jaxb.MoveableHoliday Maven / Gradle / Ivy
package com.helger.holiday.jaxb;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import com.helger.commons.annotation.CodingStyleguideUnaware;
import com.helger.commons.annotation.ReturnsMutableObject;
import com.helger.commons.equals.EqualsHelper;
import com.helger.commons.hashcode.HashCodeGenerator;
import com.helger.commons.string.ToStringGenerator;
/**
* Java class for MoveableHoliday complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="MoveableHoliday">
* <complexContent>
* <extension base="{http://www.example.org/Holiday}Holiday">
* <sequence>
* <element name="MovingCondition" type="{http://www.example.org/Holiday}MovingCondition" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
* This class was annotated by ph-jaxb22-plugin -Xph-annotate
* This class contains methods created by ph-jaxb22-plugin -Xph-equalshashcode
* This class contains methods created by ph-jaxb22-plugin -Xph-tostring
* This class contains methods created by ph-jaxb22-plugin -Xph-list-extension
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MoveableHoliday", propOrder = {
"movingCondition"
})
@XmlSeeAlso({
Fixed.class
})
@CodingStyleguideUnaware
public abstract class MoveableHoliday
extends Holiday
{
@XmlElement(name = "MovingCondition")
private List movingCondition;
/**
* Gets the value of the movingCondition property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the movingCondition property.
*
*
* For example, to add a new item, do as follows:
*
* getMovingCondition().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link MovingCondition }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getMovingCondition() {
if (movingCondition == null) {
movingCondition = new ArrayList();
}
return this.movingCondition;
}
/**
* Created by ph-jaxb22-plugin -Xph-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!super.equals(o)) {
return false;
}
final MoveableHoliday rhs = ((MoveableHoliday) o);
if (!EqualsHelper.equals(movingCondition, rhs.movingCondition)) {
return false;
}
return true;
}
/**
* Created by ph-jaxb22-plugin -Xph-equalshashcode
*
*/
@Override
public int hashCode() {
return HashCodeGenerator.getDerived(super.hashCode()).append(movingCondition).getHashCode();
}
/**
* Created by ph-jaxb22-plugin -Xph-tostring
*
*/
@Override
public String toString() {
return ToStringGenerator.getDerived(super.toString()).append("movingCondition", movingCondition).getToString();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setMovingCondition(
@Nullable
final List aList) {
movingCondition = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasMovingConditionEntries() {
return (!getMovingCondition().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoMovingConditionEntries() {
return getMovingCondition().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getMovingConditionCount() {
return getMovingCondition().size();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws IndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public MovingCondition getMovingConditionAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getMovingCondition().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addMovingCondition(
@Nonnull
final MovingCondition elem) {
getMovingCondition().add(elem);
}
}