Package de.obqo.decycle.model
Class SliceType
- java.lang.Object
-
- de.obqo.decycle.model.SliceType
-
- All Implemented Interfaces:
java.lang.Comparable<SliceType>
public final class SliceType extends java.lang.Object implements java.lang.Comparable<SliceType>
Instances ofSliceTypedefine thetypeof aNode. There is aclassType()for nodes representing a single Java class, there is apackageType()for nodes representing a package, and there iscustomType(String)for nodes representing custom slices, e.g. groups of packages. Each slice type has a name that represents the name of the slicing. For example, we might define a custom slicing "Quarter" that maps each package to one of 4 slices. That will result in 4 nodes in which each is a custom slice and all have the typesliceType("Quarter").
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SliceTypeclassType()intcompareTo(SliceType other)static SliceTypecustomType(java.lang.String name)java.lang.StringdisplayString()booleanequals(java.lang.Object o)de.obqo.decycle.model.SliceType.KindgetKind()java.lang.StringgetName()inthashCode()booleanisClassType()booleanisSliceType()static SliceTypepackageType()java.lang.StringtoString()
-
-
-
Method Detail
-
classType
public static SliceType classType()
- Returns:
- the singleton class type
-
packageType
public static SliceType packageType()
- Returns:
- the singleton package type
-
customType
public static SliceType customType(java.lang.String name)
- Parameters:
name- the name of the slicing- Returns:
- a new slice type with the given
name
-
isClassType
public boolean isClassType()
-
isSliceType
public boolean isSliceType()
-
displayString
public java.lang.String displayString()
-
compareTo
public int compareTo(SliceType other)
- Specified by:
compareToin interfacejava.lang.Comparable<SliceType>
-
getKind
public de.obqo.decycle.model.SliceType.Kind getKind()
-
getName
public java.lang.String getName()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-