@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
/** * General superclass for {@link QueuedEntityPlacerConfig} and {@link PooledEntityPlacerConfig}. */ @XStreamInclude({ QueuedEntityPlacerConfig.class, QueuedValuePlacerConfig.class, PooledEntityPlacerConfig.class }) public abstract class EntityPlacerConfig<C extends EntityPlacerConfig> extends AbstractConfig<C> { // ************************************************************************ // Builder methods // ************************************************************************ public abstract EntityPlacer buildEntityPlacer(HeuristicConfigPolicy configPolicy); @Override public void inherit(C inheritedConfig) { } }
@XStreamInclude({ ConstraintMatchTotalBestScoreSubSingleStatistic.class, ConstraintMatchTotalStepScoreSubSingleStatistic.class,
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("PjsResource") @XStreamInclude({ GlobalResource.class, LocalResource.class }) public abstract class Resource extends AbstractPersistable { private int capacity; public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity; } // ************************************************************************ // Complex methods // ************************************************************************ public abstract boolean isRenewable(); }
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("ContractLine") @XStreamInclude({ BooleanContractLine.class, MinMaxContractLine.class
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("Pattern") @XStreamInclude({ ShiftType2DaysPattern.class, ShiftType3DaysPattern.class,
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
/** * Subclasses need to implement {@link Object#equals(Object) equals()} and {@link Object#hashCode() hashCode()} * which are used by {@link ProblemBenchmarksConfig#buildProblemBenchmarkList}. * @param <Solution_> the solution type, the class with the {@link PlanningSolution} annotation */ @XStreamAlias("problemProvider") @XStreamInclude({ InstanceProblemProvider.class, FileProblemProvider.class }) public interface ProblemProvider<Solution_> { /** * @return never null */ String getProblemName(); /** * @return never null */ Solution_ readProblem(); /** * @param solution never null * @param subSingleBenchmarkResult never null */ void writeSolution(Solution_ solution, SubSingleBenchmarkResult subSingleBenchmarkResult); }
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("VrpDepot") @XStreamInclude({ TimeWindowedDepot.class })
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamInclude({ CustomPhaseConfig.class, NoChangePhaseConfig.class,
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("CsgBus") @XStreamInclude({ Coach.class, Shuttle.class
@Override public boolean add(Class<?> type) { if (type == null) { return false; } while (type.isArray()) { type = type.getComponentType(); } final String name = type.getName(); if (name.startsWith("java.") || name.startsWith("javax.")) { return false; } final boolean ret = annotatedTypes.contains(type) ? false : super.add(type); if (ret) { final XStreamInclude inc = type.getAnnotation(XStreamInclude.class); if (inc != null) { final Class<?>[] incTypes = inc.value(); if (incTypes != null) { for (final Class<?> incType : incTypes) { add(incType); } } } } return ret; } }
@XStreamAlias("TspLocation") @XStreamInclude({ AirLocation.class, RoadLocation.class
@XStreamAlias("VrpLocation") @XStreamInclude({ AirLocation.class, RoadLocation.class