de.mrapp.parser.feed.common.nullobject.AbstractFeedElementNullObject Maven / Gradle / Ivy
/*
* JavaFeedParserCommon Copyright 2013-2014 Michael Rapp
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package de.mrapp.parser.feed.common.nullobject;
import java.util.Collection;
import java.util.LinkedList;
import de.mrapp.parser.feed.common.datastructure.Attribute;
import de.mrapp.parser.feed.common.datastructure.Element;
import de.mrapp.parser.feed.common.datastructure.Pair;
import de.mrapp.parser.feed.common.model.FeedElement;
/**
* An abstract base class for all null objects, which represent a null instance
* of an element of a feed, which implements the interface {@link FeedElement}.
*
* @author Michael Rapp
*
* @since 1.0.0
*/
public abstract class AbstractFeedElementNullObject implements
FeedElementNullObject {
/**
* The constant serial version UID.
*/
private static final long serialVersionUID = 1L;
@Override
public final boolean hasAdditionalChildren() {
return false;
}
@Override
public final Collection getAdditionalChildren() {
return new LinkedList();
}
@Override
public final boolean hasAdditionalAttributes() {
return false;
}
@Override
public final Collection getAdditionalAttributes() {
return new LinkedList();
}
@Override
public final boolean hasAdditionalValue() {
return false;
}
@Override
public final String getAdditionalValue() {
return null;
}
@Override
public final boolean hasDescendingAdditionalChildren() {
return false;
}
@Override
public final Collection> getDescendingAdditionalChildren() {
return new LinkedList>();
}
@Override
public final boolean hasDescendingAdditionalAttributes() {
return false;
}
@Override
public final Collection> getDescendingAdditionalAttributes() {
return new LinkedList>();
}
@Override
public final boolean hasDescendingAdditionalValues() {
return false;
}
@Override
public final Collection> getDescendingAdditionalValues() {
return new LinkedList>();
}
@Override
public abstract FeedElementNullObject clone()
throws CloneNotSupportedException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy