![JAR search and dependency download from the Maven repository](/logo.png)
com.jetbrains.pluginverifier.repository.files.SpaceWeight.kt Maven / Gradle / Ivy
/*
* Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package com.jetbrains.pluginverifier.repository.files
import com.jetbrains.pluginverifier.repository.cleanup.SpaceAmount
import com.jetbrains.pluginverifier.repository.resources.ResourceWeight
/**
* Resource weight equal to the disk space occupied by the
* file in the [repository] [com.jetbrains.pluginverifier.repository.files.FileRepository].
*/
data class SpaceWeight(val spaceAmount: SpaceAmount) : ResourceWeight {
override fun plus(other: SpaceWeight) =
SpaceWeight(spaceAmount + other.spaceAmount)
override fun minus(other: SpaceWeight) =
SpaceWeight(spaceAmount - other.spaceAmount)
override fun compareTo(other: SpaceWeight) =
spaceAmount.compareTo(other.spaceAmount)
override fun toString() = spaceAmount.toString()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy