Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lp.unit
Class DynamicLogicProgram

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList<LogicProgram>
                  lp.unit.DynamicLogicProgram

All Implemented Interfaces:
  Serializable, Cloneable, Iterable<LogicProgram>, Collection<LogicProgram>, List<LogicProgram>, RandomAccess

    public class DynamicLogicProgram

extends ArrayList<LogicProgram>

Represents a dynamic logic program, i.e. a sequence of logic programs. In the semantics of dynamic logic programs, the rules from programs further in the sequence are preferred over rules from preceding programs.

Version:
  1.0.0
Author:
  Martin Slota
See Also:
  `LogicProgram`, `GeneralizedLogicProgram`, Serialized Form

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`DynamicLogicProgram()` Creates a new instance of `DynamicLogicProgram`.
`DynamicLogicProgram(int initialCapacity)` Creates a new instance of `DynamicLogicProgram` with the specified initial capacity.

Method Summary
`boolean` | `add(LogicProgram program)` Adds `program` to end of this dynamic logic program.
`boolean` | `isGround()` Returns `true` iff all programs in the sequence are also ground.

Methods inherited from class java.util.ArrayList
`add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Constructor Detail

### DynamicLogicProgram

    public DynamicLogicProgram()

  Creates a new instance of `DynamicLogicProgram`.

### DynamicLogicProgram

    public DynamicLogicProgram(int initialCapacity)

  Creates a new instance of `DynamicLogicProgram` with the specified initial capacity.

  Parameters:
    `initialCapacity` - the initial capacity of this `ArrayList`

Method Detail

### add

    public boolean add(LogicProgram program)

  Adds `program` to end of this dynamic logic program. In case it is `null`, an immutable empty program is added.

  Specified by:
    `add` in interface `Collection<LogicProgram>`
  Specified by:
    `add` in interface `List<LogicProgram>`
  Overrides:
    `add` in class `ArrayList<LogicProgram>`
  Parameters:
    `program` - the program to add
  Returns:
    `true`
  See Also:
    `EmptyProgram`

### isGround

    public boolean isGround()

  Returns `true` iff all programs in the sequence are also ground.

  Returns:
    as specified above
  See Also:
    `LogicProgram.isGround()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD