Class AllocationsIRef
- java.lang.Object
-
- net.splitcells.gel.data.allocation.AllocationsI
-
- net.splitcells.gel.data.allocations.AllocationsIRef
-
- All Implemented Interfaces:
net.splitcells.dem.data.Identifiable
,net.splitcells.dem.lang.dom.Domable
,net.splitcells.dem.object.Discoverable
,Allocations
,AllocationsLiveView
,Database
,Table
public class AllocationsIRef extends AllocationsI
AllocationsI.demandsUsed()
()} andAllocationsI.demandsFree()
contain allLine
ofAllocationsI.demands()
.Line
with the same conceptional identity und differentDatabase
contexts have the sameLine.index()
. The same applies toAllocationsI.supplies()
. Line removal fromAllocationsI.demands_free
andAllocationsI.supplies_free
has no subscriptions, becauseDatabase
lines can be remove from theAllocations
completely or they can be moved to the respectively used tables. TODO FixAllocationsI.demandOfAllocation(Line)
by usingAllocationsI.demands_used
. TODO FixAllocationsI.supplyOfAllocation(net.splitcells.gel.data.table.Line)
by usingAllocationsI.supplies_used
. TODOAllocationsI.add(Line)
: The input argument has to be split into a supply and a demand part and a fitting supply and demand pair already would be searched and used onallocate(supply, demand)
. If a fitting supply and demand pair does not exit the input is invalid. TODOAllocationsI.path()
: Support for multiple path. In this case paths with demand and supplies as base. TODOAllocationsI.path()
: Define this as an convention regarding the meaning of demands and supplies.
-
-
Field Summary
-
Fields inherited from class net.splitcells.gel.data.allocation.AllocationsI
additionSubscriptions, afterRemovalSubscriptions, allocations, allocationsIndex_to_usedDemandIndex, allocationsIndex_to_usedSupplyIndex, beforeRemovalSubscriptions, demands, demands_free, demands_used, names, supplies, supplies_free, supplies_used, usedDemandIndexes_to_allocationIndexes, usedDemandsIndex_to_usedSuppliesIndex, usedSupplyIndex_to_usedDemandsIndex, usedSupplyIndexes_to_allocationIndexes
-
Fields inherited from interface net.splitcells.gel.data.table.Table
GET_LINE_VIA_STREAM
-
-
Constructor Summary
Constructors Constructor Description AllocationsIRef(String name, Database demand, Database supplies)
TODO FIX Make constructor private.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Line
allocate(Line demand, Line supply)
net.splitcells.dem.data.set.Set<Line>
allocationsOfDemand(Line demand)
net.splitcells.dem.data.set.Set<Line>
allocationsOfSupply(Line supply)
<T> ColumnView<T>
columnView(Attribute<T> attribute)
boolean
equals(Object arg)
int
hashCode()
void
remove(Line allocation)
-
Methods inherited from class net.splitcells.gel.data.allocation.AllocationsI
add, addTranslated, allocationOf, columnsView, demandOfAllocation, demands, demandsFree, demandsUsed, headerView, headerView2, identity, lookupEquals, path, rawLines, rawLinesView, remove, size, subscribeToAfterAdditions, subscribeToAfterRemoval, subscribeToBeforeRemoval, supplies, suppliesFree, suppliesUsed, supplyOfAllocation, toDom, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.splitcells.gel.data.allocation.Allocations
allocationsOf
-
Methods inherited from interface net.splitcells.gel.data.allocation.AllocationsLiveView
supply_of_demand
-
Methods inherited from interface net.splitcells.gel.data.database.Database
query, replace, synchronize
-
Methods inherited from interface net.splitcells.gel.data.table.Table
contains, distinctLines, distinctLineValues, hasContent, isEmpty, isPresent, line, lines, linesStream, lookup, lookupEquals, rawLine, toCSV, toFods, toHtmlTable
-
-
-
-
Method Detail
-
allocate
public Line allocate(Line demand, Line supply)
- Specified by:
allocate
in interfaceAllocations
- Overrides:
allocate
in classAllocationsI
-
remove
public void remove(Line allocation)
- Specified by:
remove
in interfaceDatabase
- Overrides:
remove
in classAllocationsI
-
columnView
public <T> ColumnView<T> columnView(Attribute<T> attribute)
- Specified by:
columnView
in interfaceTable
- Overrides:
columnView
in classAllocationsI
-
allocationsOfSupply
public net.splitcells.dem.data.set.Set<Line> allocationsOfSupply(Line supply)
- Specified by:
allocationsOfSupply
in interfaceAllocationsLiveView
- Overrides:
allocationsOfSupply
in classAllocationsI
-
allocationsOfDemand
public net.splitcells.dem.data.set.Set<Line> allocationsOfDemand(Line demand)
- Specified by:
allocationsOfDemand
in interfaceAllocationsLiveView
- Overrides:
allocationsOfDemand
in classAllocationsI
-
equals
public boolean equals(Object arg)
- Overrides:
equals
in classAllocationsI
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAllocationsI
-
-