lp.struct
Class LpAbstractStructureUnit
java.lang.Object
lp.struct.LpAbstractStructureUnit
- All Implemented Interfaces:
- LpStructureUnit
- Direct Known Subclasses:
- LpAtom, LpCompoundTerm, LpConstant, LpFunction, LpLiteral, LpPredicate, LpRule, LpVariable
public abstract class LpAbstractStructureUnit
- extends Object
- implements LpStructureUnit
This abstract class offers a default implementation of the
toString()
method for all classes implementing the
LpStructureUnit
interface.
- Version:
- 1.0.0
- Author:
- Martin Slota
- See Also:
LpStructureUnit
,
LpConstant
,
LpVariable
,
LpCompoundTerm
,
LpFunction
,
LpPredicate
,
LpAtom
,
LpLiteral
,
LpRule
TO_STRING_BUFFER
protected static final LpBuffer TO_STRING_BUFFER
- A single
LpBuffer
instance for the toString() method. All calls
to toString()
are synchronized on it, so it is not a good idea
to call toString()
on LpStructureUnit
s from many
threads...
LpAbstractStructureUnit
public LpAbstractStructureUnit()
toString
public String toString()
-
- Overrides:
toString
in class Object
toUnmodifiableList
protected static <T> List<T> toUnmodifiableList(List<T> list)
- Converts the given list to an unmodifiable list using the
Collections.unmodifiableList(List)
method. But there are two
differences:
- Parameters:
list
- the list whose read-only view should be returned
- Returns:
- as specified above
toUnmodifiableSet
protected static <T> Set<T> toUnmodifiableSet(Set<T> set)
- Converts the given set to an unmodifiable set using the
Collections.unmodifiableSet(Set)
method. But there are two
differences:
- Parameters:
set
- the set whose read-only view should be returned
- Returns:
- as specified above